MySQL Forums
Forum List  »  Performance

Re: Queries slow down daily, optimizing helps -> why?
Posted by: Rick James
Date: February 19, 2009 01:52AM

A possible explanation for speed difference...
Some of RAM is being used as a 'cache'. OPTIMIZE brings the entire table and indexes into memory (since it will fit). Then the SELECT can do its job without touching the disk.

If you don't run that SELECT for a while, and if other tables are busy, the data may get flushed from cache. Then when you run your SELECT again, it has to hit the disk.

I often find a 10x difference between a query that has to run from disk versus running from memory.

When the SELECT is slow, what happens if you promptly run the SELECT again? I expect it to be fast the second time.

Is "schul" a whole word? Or only part of a word. I don't know, for example, whether FULLTEXT understands German compound nouns. "Strasse" is probably not found in "Bahnhofstrasse" using fulltext. But it would be found using LIKE '%strasse%'.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Queries slow down daily, optimizing helps -> why?
2331
February 19, 2009 01:52AM
2201
March 18, 2009 03:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.