Answer the question
In order to leave comments, you need to log in
Creating tables by month, MySQL - which way to choose?
There is a table of active sessions, which is written and read quite dynamically. The number of records in it is growing terribly fast. The information is necessary and active, so I can’t archive immediately for the last month.
Here, I came to the conclusion that creating tables by months is the best solution for my case. The only negative is that if the session was opened at the end of last month, and you need to close it in the current one, what should you do? I'm scratching my head...
How can I implement it better?
- creation by Cron
- hang a trigger for the DBMS
- sew this logic into the app itself
- your option
Answer the question
In order to leave comments, you need to log in
The only negative is that if the session was opened at the end of last month, and you need to close it in the current one, what should you do? Breaking my head...There are many options, depending on how you will use the data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question