Home > database >  A simple mysql optimization problem
A simple mysql optimization problem

Time:09-30

Now there are two queries
The first query is shown in the web page list data
The second query is based on the first list, select the row id query details of the corresponding table

Now paging query first list table, forward and backward pages are soon

Now if the details for a query, and then return to the list page, and then to flip the query will be 2-3 seconds on the card, and then turn the page speed is normal,
Returns will appear after each click details, what reason be? Want to how to optimize?

CodePudding user response:

First catch the slow query log is a database response slowly

CodePudding user response:

reference 1st floor rucypli response:
first grasp the slow query log is the database slow

Caught is to display database slow

CodePudding user response:

1. The first check the slow query log
2. Look at the execution plan

CodePudding user response:

The
reference 3 floor McXhh2005 response:
1. First check the slow query log
2. Look at the execution plan


Can specifically, or where there is teaching? Previously used mysql

CodePudding user response:

See the execution plan:
Explain your query

CodePudding user response:

reference 5 floor ZJCXC reply:
see execution plan:
Explain your query



Is this?

CodePudding user response:

After changed the mysql configuration, if this situation is not appeared
  • Related