" impact of indexes on individual table queries "
Impact of indexes on individual table queries
The index is used to quickly find a row with a specific value on a column. Without an index, MySQL had to start with the first record and then read through the entire table until it found the relevant line. The larger the table, the more time it takes.
If the table has an index to the column of the query, MySQL can quickly reach a location to find the middle of the data file, and there is no need to consider all the data. If a table has 1000 rows, this is at least 100 times times faster than sequential reads. Note that you need to access almost all 1000 rows, which are read in a faster order, because at this point we avoid disk pathfinding.
For example, a student table such as the following:
Thus, when we try to make a specific query on it, we have to do a full-table scan, which is very slow.
For example, we find all students who have failed in English.
If we create an index for the 中文版 column:
Therefore, the following query is executed
Mysql>select name,english from user WHERE english<60;
The result is: you should be able to find that this result differs from the non-indexed English column before it is sorted, the reason formally described above. Links: http://blog.csdn.net/tsuliuchao/article/details/4877157
Impact of indexes on individual table queries