Query slow after reboot
I've a strange problem. I've a products table with about 4 milion records in it. It has a primary key "id" integer. There are no modifications to this table. Every night it is fully recreated.
Joins on id column becomes slow after a period of time but sure after a reboot. I've found out that one of the folowing operations bring the speed back (for a period):
a. Run: REPAIR TABLE Products QUICK; or
b. Create an extra index on id column or
c. Drop the extra index on id column
Extra information:
* MySQL 5.1.51 / CentOS 5.5 x64
* The key_bufer_size in my.cnf is set to 1024M
* There is relative much memory available (24GB)
* No updates to table occurs
* EXPLAIN will show that primary key/index is used in slow and fast situation
On fast situation we speak about miliseconds (with diferent sets of id's)
On slow situation we speak about minutes (e.g. 130 seconds)
Query cache seems to work because the same join twice in slow mode will be fast the second time. But the slow mode exists for other result sets..
What can I do.. what do I miss.. Any help would be greatly apreciated.
Kind regards,
Arian
Subject
Views
Written By
Posted
Query slow after reboot
2999
April 05, 2011 04:04PM
1680
April 06, 2011 07:49PM
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.