Home > database >  Mysql efficiency optimization
Mysql efficiency optimization

Time:09-29

In ali cloud deployment mysql5.7.19, database, there are 34907, 28476 through the following query to filter the data, spent 17 seconds, and spend less than 1 s, the local server
 SELECT 
ID,
TRACK_ID,
LNG,
LAT,
` UTC_TIME `,
SPEED,
HEADING,
NO_OF_SATELLITES,
IGNITION,
MAIN_POWER_STATUS,
GSM_SIGNAL_STRENGTH,
GPS_FIX,
PACKET_STATUS
The FROM
TRACK A
WHERE
TRACK_ID='354972060039700'
AND ` UTC_TIME ` & gt;=1517189160000
AND ` UTC_TIME ` & lt;=1517880360000
The ORDER BY
ID



Profile analysis, which removed the ORDER BY ID analysis diagram:

Have the ORDER BY ID analysis diagram:


Table structure, index, and state are defined as follows:





Explain:

CodePudding user response:

This should be your nginx configuration problems

CodePudding user response:

I don't have deployed nginx, have nothing to do with nginx,

CodePudding user response:

Compare the EXPLAIN of two machines

CodePudding user response:

Look at the two machines on the execution of the plan how to explain...
  • Related