Reputation: 7774
I'm trying to test / improve an sql query for speed however caching is not showing me the true speed.
Is there something I can add to sql to turn it off for that query ?
Also, if there isn't how else can I test and find the true speed ?
Upvotes: 5
Views: 2901
Reputation: 4323
You can add a SQL_NO_CACHE clause to your queries to request that MySQL run the query rather than return a cached result:
SELECT SQL_NO_CACHE * FROM myTable;
Edit:
There is another way of dong this if you have access to configurations
setting query_cache_type = 0 or query_cache_type = OFF in MySQL's conf
Upvotes: 4
Reputation: 382831
You can use MySQL's:
Upvotes: 0