There are two main types of optimizations for massive data:
the way of large table splitting table; optimization of SQL statements Partitioning Technology:similar to horizontal segmentation, but it is a horizontal table at the logical level, which is still a table for the application This data test I directly, to its explanation also on the picture, the interest of the friend can look at their own operation simulation test, it is easy to understand its principle. of course, self-belief is the great God's possible detour.
Range Mode
1. Create a partitioned table can be seen under/usr/local/mysql/var/test/to generate so many files (26)
2. Create an unpartitioned table You can see the generated 3 files under/usr/local/mysql/var/test/.
3. Establish Load_part_tab storage
4. Add 800W data Use commands under/usr/local/mysql/var/test/: watch-n1 ls-lh Dynamically view dynamic changes in each partition of the inserted data use the top order to see the CPU and memory usage
5, in the non-partitioned table also insert so much data
6. Test SQL Performance To view the number of rows affected Create an index test SQL Performance again Add non-indexed field query this time share so much for everyone.
If there is something in this blog that is difficult to understand, please contact the message, if there is a wrong place to welcome the point.
If you feel that you can get a new knowledge of this blog, please give me the top one, as explained in the article in the wrong place, welcome to point out.
Learn from each other and make progress together!
MySQL Partitioning technology