Single-table queries slow Mysql million data records of how to do?

1, do not use Select * query, the query field you want to write.

2, query results with defined limit.

3, OR written IN: n is because the efficiency level OR, IN is log (n) level.

4, avoid using in the where clause! = Or> <operator, otherwise it will give up a full table scan index.

5, a list of data do not take full table of data, use a limit to paging.

Guess you like

Origin www.cnblogs.com/hcc0126/p/12519677.html