The SQL statement: select * from ` looktime ` where lookclassi='9' and looktime between '1519228800' and '1521647999'
This query is a field of a month's time, so that the query will become much slower than direct query,
This is a query within one month of time, much faster than figure 1
In figure 2, by contrast, the data also play than figure 1, why is slower than the figure 2, figure 1
Figure 1 query must be again, what can the SQL optimization, query speed, speed, hope, can solve the great god, thank you very much,
CodePudding user response:
Looktime indexed?
CodePudding user response:
Look at the table structure
Show create table ` looktime `;
CodePudding user response:
Index should be a problem, see lookclassi fields below can be null, whether to have joint index
CodePudding user response: