Click here to get back home

clean up tables after deletes

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
clean up tables after deletes clb 04-01-2007
Posted by clb on April 1, 2007, 10:43 am
Please log in for more thread options
I noticed that in phpMyAdmin there is a way to cleanup and compact
tables that have had lots of deletes done to them. Can anyone tell me
how to do that manually? I find phpMyAdmin to be a pain so I don't want
to use it but I would like to compact some tables that got bloated with
testing and are now much smaller than before. The main reason I want to
clean them up is that new records go into slots previously used and
deleted instead of going at the end, where they naturally belong
(chronologically). Thanks.


Posted by Gordon Burditt on April 1, 2007, 6:49 pm
Please log in for more thread options
>I noticed that in phpMyAdmin there is a way to cleanup and compact
>tables that have had lots of deletes done to them. Can anyone tell me
>how to do that manually?

OPTIMIZE TABLE or REPAIR TABLE

Also, if you want to do a lot of them, see mysqlcheck.

>I find phpMyAdmin to be a pain so I don't want
>to use it but I would like to compact some tables that got bloated with
>testing and are now much smaller than before. The main reason I want to
>clean them up is that new records go into slots previously used and
>deleted instead of going at the end, where they naturally belong
>(chronologically). Thanks.

In SQL, records do not have an order, unless you use ORDER BY. The
physical location of records is not something you should be worrying
about or depending on.



Similar ThreadsPosted
one or many tables June 16, 2005, 7:34 pm
Junction Tables - Necessary, Useful, or Neither? October 4, 2005, 12:07 am
Selecting from more than two tables October 31, 2005, 3:34 pm
Optimizing tables March 24, 2006, 7:45 am
Linking Tables July 31, 2006, 11:42 am
join tables? August 20, 2006, 3:21 am
Slow joining of two tables July 6, 2005, 5:41 pm
two tables selecting fields September 24, 2005, 2:44 pm
Query from multiple tables October 15, 2005, 6:29 pm
Restricting Access to Tables November 7, 2005, 1:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap