MySQL – force not to use cache for testing speed of query

Try using the SQL_NO_CACHE (MySQL 5.7) option in your query.
(MySQL 5.6 users click HERE )

eg.

SELECT SQL_NO_CACHE * FROM TABLE

This will stop MySQL caching the results, however be aware that other OS and disk caches may also impact performance. These are harder to get around.

Leave a Comment