$cirisme
July 6th 2003, 06:17 PM
If you run a MySQL-driven website, it's good to know how to optimize your tables.
After a while, constant editting and deleting will leave fragments in the database which will slow the database down. Using the MySQL optimize command, you can clear these fragments out.
Fragments are mostly left by deleting or editting a row in the MySQL database. You can tell if a table needs optimization by going into PHPMyAdmin(if you don't have this, get it... it is invaluable) and opening the table you're interested in.
IF the table needs optimization, you will see a statistic in red that shows "Overhead: X bytes". If you hit optimize, it will delete those fragments and ensure that everything is running smoothly.
The more your database is edited, the more you'll want to use this. I almost have to optimize TW's database(which is constantly edited, and entries removed) everyday, whereas I have never optimized Mononoke's database even though it is constantly being written to. The difference is that Mononoke's db is never(intentionally :brow:) edited and rows don't get deleted.
:smile: :bunny:
After a while, constant editting and deleting will leave fragments in the database which will slow the database down. Using the MySQL optimize command, you can clear these fragments out.
Fragments are mostly left by deleting or editting a row in the MySQL database. You can tell if a table needs optimization by going into PHPMyAdmin(if you don't have this, get it... it is invaluable) and opening the table you're interested in.
IF the table needs optimization, you will see a statistic in red that shows "Overhead: X bytes". If you hit optimize, it will delete those fragments and ensure that everything is running smoothly.
The more your database is edited, the more you'll want to use this. I almost have to optimize TW's database(which is constantly edited, and entries removed) everyday, whereas I have never optimized Mononoke's database even though it is constantly being written to. The difference is that Mononoke's db is never(intentionally :brow:) edited and rows don't get deleted.
:smile: :bunny: