Just deleting rows from a mysql database does not tend to release disk space.
This method is drastic, but will get the disk space back:
- Extract any data you want to keep from the database (we are about to delete all the records)
- select max(id) from <table name>;
- truncate <table name>;
- alter table <table name> auto_increment=<starting id>;
this leaves you an empty database but the ids generated for new rows will be unique from the ones in the original database rows.
No comments:
Post a Comment