How to separate data tables, but can still be used together on the site? As there is more and more data, the SQL file size becomes larger and larger.

clipboard.png

the problem I face now is
I have a datasheet that is almost 1 million.
it"s not a way to go on like this.
how can I separate it out, but I can still use the data from the datasheet?
because suppose I export it to the drop table
I can"t use it on my website, so it can"t be used with the newly generated data?
I have also thought about opening another table and renaming the table with a lot of data, but the size of the backed-up file will get bigger and bigger.
can you give me some advice


  1. millions of small case, don't worry about it at all
  2. if you really want to take it apart, make sure you still want to use your old data? If you want to use it, it can only be a normal horizontal sub-table (such as by id or by date); if you can not use it, just move the unused old data to another table every day

personal suggestion:

;
:text;
:

based on what your table is based on, you can do sub-tables, and then route to different data tables according to the requested object


MySQL can still cope with millions of levels. If you are simply afraid of affecting performance, you can build an index. If you really want to split it, name the table by time, such as table_2019_01_31, and then switch flexibly according to conditions when querying.

Menu