Sublime directory Surf the web anonymous Pagerank Monitor


Checking tables that need OPTIMIZE

Thanos
Mon 30 January 2006, 05:50 pm GMT +0100
I would like to ask, how can I query the database and know if a table needs to be optimized( OPTIMIZE table;)

Thanks

Nikolas
Mon 30 January 2006, 06:50 pm GMT +0100
You can use the statement SHOW TABLE STATUS

The row Data_free gives the overhead of the table.

http://dev.mysql.com/doc/refman/4.1/en/show-table-status.html

wineo
Mon 30 January 2006, 07:07 pm GMT +0100
I like this one, it give such great stats!

Nikolas
Mon 30 January 2006, 07:08 pm GMT +0100
Wait a sec, I will publish a script that I've made, that checks the overhead, and optimizes only the tables that have problem.

Nikolas
Mon 30 January 2006, 07:24 pm GMT +0100
Here you are : http://www.webdigity.com/index.php/topic,1367.0.Optimize+all+your+tables+automatically.html

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional