FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.
Knowledgebase: PHP/MySQL
Database is slow after making changes?
Posted on 11 May 2006 06:21 AM
Question:

I did a large delete in one of my databases and now the database is slow. Did it get corrupted?

Answer:

The ANALYZE TABLE and CHECK TABLE commands are ways to check your tables for various types of corruption.

Whenever you delete a large amount of data in your database, to reclaim the space and defragment the data file, you should use the OPTIMIZE TABLE command. It is also recommended to do this as a matter of routine maintenance. Incorporating it into your backup routine is suggested.

For further information on these commands, please see the MySQL documentation at:
http://dev.mysql.com/doc/refman/5.0/en/table-maintenance-sql.html

Database management tasks such as this can also be done with applications like phpMyAdmin. For direct assistance, you can find the project page for phpMyAdmin at:
http://sourceforge.net/projects/phpmyadmin/

Assistance in this area may also be found within the FutureQuest Community Forums:
http://www.FutureQuest.net/forums/