• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I get MySQL to perform queries without any kind of caching?

I have a JSON controller that makes a number of MySQL queries. One of the queries seems to have gotten slower but I don't know which one it is.

The problem is that sometimes the query is slow and then other times it is faster (especially if I run the same request immediately afterwards.)

This leads me to believe that MySQL is doing some kind of caching?

So, my question is: How can I get CodeIgniter / MySQL to run queries without any kind of caching so that I can start tracing which query is causing the problems?

Thanks for any ideas on how to get started on this!


Google helps for these kinds of things, literally 100's of valid answers. Here is what I got in position 1:


From the search query "how to stop mysql from caching results". Scroll down the page, I use the NOW() option.

Good luck bug hunting your queries, hope you find the culprit!

One other thing that springs to mind, try rebuilding you indexes, that should give you some instant improvement regarding speed.

The profiler will show you all of the queries being run during an execution cycle, along with their memory consumption and query time. Good for troubleshooting stuff like this.

Also make sure you turn off caching in your ajax call (if you're using jQuery there is an $.ajax setting for that) and check to see if you have CI's Query Caching enabled. Those could also affect that.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.