mlse
11-01-2009, 06:58 PM
Hi all,
I'm using version 5.1 on Debian Etch.
I am currently fiddling with my DB architecture and queries on my development machine and I am trying to find the fastest way to do what I want to do.
The trouble is that MySQL seems to be remembering my queries. E.g. the first time I enter a query, it is executed in 3.4 seconds (for example). When I re-run the same query, it is executed immediately! (0.0 seconds is reported). Another similar query is reported as running in 0.0 seconds too ... but when I shut down and re-start MySQL, the second query is reported as running in 5.2 seconds (or whatever) or the first query runs in 3.4 seconds again.
The point is that it would seem that MySQL is remembering my results/doing something clever to optimise itself in order to execute my queries as fas as possible.
*BUT* I'd like to be able to switch that behaviour off so that I can measure the time it takes to execute a query without optimisation, because that will give a "worst case" measure of query speed (which is important for getting a true measure of the efficiency of my queries!).
I'm using version 5.1 on Debian Etch.
I am currently fiddling with my DB architecture and queries on my development machine and I am trying to find the fastest way to do what I want to do.
The trouble is that MySQL seems to be remembering my queries. E.g. the first time I enter a query, it is executed in 3.4 seconds (for example). When I re-run the same query, it is executed immediately! (0.0 seconds is reported). Another similar query is reported as running in 0.0 seconds too ... but when I shut down and re-start MySQL, the second query is reported as running in 5.2 seconds (or whatever) or the first query runs in 3.4 seconds again.
The point is that it would seem that MySQL is remembering my results/doing something clever to optimise itself in order to execute my queries as fas as possible.
*BUT* I'd like to be able to switch that behaviour off so that I can measure the time it takes to execute a query without optimisation, because that will give a "worst case" measure of query speed (which is important for getting a true measure of the efficiency of my queries!).