SegmentFault (www. sf. gg) is a leading developer technology community in China. We hope to provide programmers with a pure and high-quality technology exchange platform to learn, communicate and grow with developers and create an era for developers!
Reply content:
1 million of the data volume is small, and the optimization is generally to add an index.
There is no index;
Does the query statement use indexes;
What is the distribution of data records and index fields;
What types of data fields are there;
Add indexes and optimize SQL statements,
Select count (primary key or unique index)
Mysql 10 millions or 20 millions data is also supported, depending on the needs
1.37 million is nothing at all.
1. pay attention to index hits of SQL statements during queries.
2. check the MYSQL cache configuration.
3. use primary key query whenever possible.
4. vertical cutting of tables can be performed to reduce data redundancy based on business needs.