0

Had a table with about 2,000,000 rows (168 MB)

Deleted 1,800,000 rows but the table size is unchanged!?

Why is that? The rows where deleted about two days ago now, but the table size is still 168 MB?

MySQL 5.6.20 innodb table

3
  • Possible duplicate of MySQL InnoDB not releasing disk space after deleting data rows from table Commented Oct 12, 2015 at 8:37
  • did you try to optimize it, to save disk operation the file is not optimize on every delete and hence the "Table" size remain unchanged. Commented Oct 12, 2015 at 8:38
  • @sumit, create an anwser :) table optimize solved the problem Commented Oct 12, 2015 at 8:45

2 Answers 2

1

Did you try to optimize it, to save disk operation the file is not optimize on every delete and hence the "Table" size remain unchanged.

You need to optimize it and sometime Re-index can also reset the table size.

Sign up to request clarification or add additional context in comments.

2 Comments

How to do that?
One way is running OPTIMIZE TABLE <table_name>; or if you use PHPMyAdmin like tool then under Operations or table setting you might find a button for it.
0

try to optimize the table because you have used delete statement. 'shrink' size of table for optimization.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.