Question & Answer
Question
RTM runs out of the disk space. How to reduce the size of RTM MySQL database?
Cause
Most of the disk space was occupied by the MySQL database.
Answer
Find the table with big size and refer to the steps below to delete the data from the table.
Take table grid_job_daily_stats as an example and please note the steps are suitable for non-partition table:
select min(<column of attribute timestamp>), max(<column of attribute timestamp>) from <table name>;
delete from <table name> where <column of attribute timestamp> < timestamp’<date>’;-- you decide the date accordingly
commit;
optimize table <table name>;
commit;
For example:
select min(date_recorded), max(date_recorded) from grid_job_daily_stats;
delete from grid_job_daily_stats where date_recorded < timestamp ’<>date’,- you decide the date, say ’2013-8-12’;
commit;
optimize table grid_job_daily_stats;
commit;
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1026129