MySQL large data paging optimization


Reference article:

Paging query method and its optimization for millions of data in MySQL

MySQL paging query optimization



The key points are as follows:

In the process of optimizing paging statements, you must pay attention to adding sorting fields to the query statements, and you must create your own tables. Some of them may not be effective

For example, the following two statements return different results. For specific reasons, please see another blog

What is the default sort for MySQL

 SELECT id FROM t_attach_new  LIMIT 2000000, 1;
 SELECT * FROM t_attach_new  LIMIT 2000000, 1;




Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]