Why is access to my database very slow?

Posted by Fabien on Server Fault See other posts from Server Fault or by Fabien
Published on 2012-10-15T15:33:59Z Indexed on 2012/10/15 15:39 UTC
Read the original article Hit count: 248

Filed under:
|

I have a mysql database that used to work perfectly fine, but now it is dead slow on startup. When I type in

$> mysql -u foo bar

I get the following usual message for about 30 seconds before I get a prompt :

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Of course, I tried it and it goes a lot faster :

$> mysql -u foo bar -A

But why do I have to wait so long in regular startup ? This is not a very big database, and data does not seem to be corrupted (everything looks fine after startup). I have no other client connecting to the mysql server at the same time (only one process is shown with the command show full processlist) and I have already restarted the mysqld service.

What's going on ?

© Server Fault or respective owner

Related posts about mysql

Related posts about startup