Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Why do you worry about caching? Let Django or mysql do what they do. </p> <p>If you are bent on it. You could disable caching for Django. This is quite simple thing to do in settings.py for your project.</p> <p>For Mysql, you need to run some querie(s) to disable the query cache -</p> <p>Try using the <code>SQL_NO_CACHE</code> option in your query. Like so</p> <pre><code>SELECT SQL_NO_CACHE * FROM TABLE </code></pre> <p>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.</p> <p>One problem with this method is that it seems to only prevent the result of your query from being cached. However, if you're querying a database that is actively being used with the query you want to test, then other clients may cache your query, affecting your results. I am continuing to research ways around this, will edit this post if I figure one out.</p> <p><strong>OR</strong></p> <p>You could also do <code>RESET QUERY CACHE</code></p> <p><strong>OR</strong></p> <pre><code>FLUSH QUERY CACHE </code></pre> <p>Although one point to note is that I would suggest letting the Mysql handle the <code>WHERE</code> clause as it has query optimization layer which would be very effective if you have the right fields indexed. Getting all the results &amp; you doing what the <code>WHERE</code> clause does might slow you down depending on the size of the query set. Just some thing to think about. I guess proper benchmarking should show you the way.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload