Nitin Pund
Nitin Pund

Reputation: 1092

AWS RDS Table size increased after deleting the data using procedure

Hello All,

I am currently working on the task which contains the deletion of the data from the mysql database.

Right now I have deleted data from only one table which has approx 80 Millions of records.

Table size before deleting the data was 40 GB among which 20 GB is data size and 20 GB is index size. When I delete the data from the table in batches of 10000 using mysql procedure, table size increases.

Following are the steps that I have executed

But, still no success. Table size not getting reduced, rather it increases each time.

Upvotes: 0

Views: 2659

Answers (1)

Pierre
Pierre

Reputation: 716

As nobody answered but very good pointers in the comment;

As of today, deleting records does not necessary free the actual space on RDS/MySQL (I just deleted 1.5TB) and the table space usage remained the same.

As hinted in the comment and other question:

optimize table log;

Does solve the problem. Also "Table does not support optimize, doing recreate + analyze instead". hth

Upvotes: 0

Related Questions