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

clarkk
  • 27,151
  • 72
  • 200
  • 340
  • Possible duplicate of [MySQL InnoDB not releasing disk space after deleting data rows from table](http://stackoverflow.com/questions/1270944/mysql-innodb-not-releasing-disk-space-after-deleting-data-rows-from-table) – Lukasz Szozda Oct 12 '15 at 08: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. – Sumit Gupta Oct 12 '15 at 08:38
  • @sumit, create an anwser :) table optimize solved the problem – clarkk Oct 12 '15 at 08:45

2 Answers2

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.

Sumit Gupta
  • 2,152
  • 4
  • 29
  • 46
0

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

om_mish99
  • 11
  • 2