Mysql order by operation performance problems in my notebook, run the following SQL code (a total of about 70 thousand rows of data, no index) select * from (SELECT nodeinfo. nodeID nodeid, nodeinfo. niid, nodeinfo. type, nodeinfo. testType testtype, sensordatapacket. storedtime, sensordatapacket. value, sensordatapacket. unit, sensordatapacket. dataType datatype, nodeconfig. nodeAddress nodename FROM www.2cto.com nodeinfo Left Join sensordatapacket ON nodeinfo. nodeID = Sensordatapacket. nodeID Left Join nodeconfig ON nodeconfig. nodeID = nodeinfo. nodeID where testtype = 'test' and type = 'soil temperature 'order by storedtime desc) a group by. nodeid order by. storedtime desc: red-letter annotation. When order by storedtime desc is used, the total time is 9.284 s. When order by storedtime asc is used, the total time is 2.022 s when the 172.164s operation is not used. For each nodeid, the most recent data record of storedtime is retrieved. If the order by operation is not used, the data is retrieved. The storedtime is a certain time in the middle. In line with the database relational model theory proposed by Dr. E. F. Codd in "a relation modal of data for large shared data banks. The physical storage of a database is not necessarily stored in the primary key sequence. The data in a data table is essentially in a collection.