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.htmlwineo
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