The total number of records 5 w - 6 w
Query function: from all records using group by find out each site_code corresponding to the maximum m's record
select * from hour_data where (source=0 or source=2) and (time_ticks between '21:23:33' 2017-10-01 and '2017-10-15 s 21:23:33') group by site_code order by m DESC limit 10;
This statement is the total time of around 10 s, the result is slow? If slow from where am I supposed to change?
CodePudding user response:
Explain the execution plan, may be not appropriate indexesCodePudding user response:
How big amount of data, large, to be built on the field index (as far as possible is to distinguish the degree of large field)