Tuesday, August 17, 2004

MySQL Freeing Space

When you delete records in MySQL, the table is not compressed - the space is left free for future inserts. In order to see how much “claimed by not used” space you have, use “Show Table Status” (e.g. “show table status from jssdatabase), and check the “Data_free” column. To “compress” the DB, use “Optimize Table” (e.g. “optimize table jss_carts").

2 comments:

Cristóbal Tello said...

If you have error then use this syntax: SHOW TABLE STATUS LIKE table

Cristóbal Tello said...

Also, you can use SHOW TABLE STATUS LIKE table