A friend of www.2cto.com asked a question today. The original Article is: mysql5.1, MyISAM table, select count (*) as total FROM m_bff WHERE from_uid = '000000' AND isdeleted = 0. From_uid has an index. The speed of executing this sentence for the first time is slow. It takes more than one second. The speed of using show profile is slow on Sending data. However, when I add SQL _no_cache, the execution takes only 0.01 seconds. Many sentences are similar. The first time the execution is slow, the addition of SQL _no_cache is not slow, and the Key_blocks_unused is also large, what is the reason for this? The problem is summarized as follows: why is the first query of the MyISAM table much slower than the second query? Recall the differences between innodb and MyISAM. One of the most important aspects is that MyISAM only caches index content, while innodb not only caches indexes but also data. It should be said that every time MyISAM queries data, there should be no big speed gap between Disk Access. In fact, there is an OS-level File Cache between MyISAM files and the operating system. The guess is the ghost of the OS file cache. Www.2cto.com: The verification method is actually very simple. Run cat 3>/proc/sys/vm/drop_caches with root permission in shell to clear the OS file cache, run SQL again to see if the speed is the same as that of the first run. Result: echo 3/proc/sys/vm/drop_caches slowed down again. It seems that the problem you mentioned is extended: after knowing the feature of MyISAM, you can use the File pre-read Method for Data push. Assume that a table is a hotspot table and the operating system has more memory. We can use cat table. MYD>/dev/null to load the file into the OS file cache. In this way, when data of some users is accessed for the first time, there will be no slow query.