I don't know if mySQL caches results, but your system almost surely caches disk sectors read. I've noticed in another database app that I'm working on (not mySQL) that executing the same query twice runs noticably faster the second time, and I know the DBMS isn't caching results because I'm using a lower-level interface so I'm implementing the query myself.

Russ writes:

Hi,

I'm doing some web development and have mysql (3.23.x) installed
to test with (win2k, but I don't think this question is particularly platform specific).


I have a reasonably complex query which I am trying to optimise.
When I first startup mysql, and perform the query, it can take
10 or so seconds. However, further subsequent queries (sorting by the same column) return in a fraction of a second. This is true
even with new WHERE or LIMIT clauses.


Is mysql creating a 'temporary' index and caching it? Is the original
10 second query the actual time for my query to execute? I'm finding
it difficuly to optimise my query as I'm not sure exactly which times are correct.


Hope I've explained this OK - sure I'm missing fundamental, so apologies in advance.

Regards,
Russ






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to