How to solve this problem?
CodePudding user response:
The second time the same SQL query because already cache results,First 30 s is required, then use EXPLAIN a look at the execution plan, and then add the necessary index according to the circumstance or optimizing the query,
CodePudding user response:
That is the value of the first query is true SQL query efficiency? At the back of the query is obtained from the cache, so fastCodePudding user response:
https://help.aliyun.com/knowledge_detail/41717.htmlCodePudding user response:
The second query from the cache the query result set, so the efficiency is improved,CodePudding user response:
Have a look at the explain plan of implementation, whether to have appropriate indexes,CodePudding user response:
Upstairs said is right, the index partition, or change the query SQL there is always a suitable for youCodePudding user response:
The innodb_buffer_pool_size configuration file size is how much, server memory is how much,CodePudding user response:
The buffer pool size and see how many, slow query means that the data in a while and then LRU list was removed in buffer pool is not big enough, increase of dirty pages accounted,And see if the query cache