Closed moonsungjun closed 6 years ago
ocid 삭제
select unix_timestamp('2018-09-01');
-- '1535727600'
select * from prq_cdr_tmp where unix_timestamp(cd_date)<1535727600 limit 1;
select count(*) cnt from prq_cdr_tmp where unix_timestamp(cd_date)<1535727600;
-- '3,155,984'
delete from prq_cdr_tmp where unix_timestamp(cd_date)<1535727600;
-- delete from prq_cdr_tmp where unix_timestamp(cd_date)<1535727600
-- 3155984 row(s) affected
-- 14:37:44 delete from prq_cdr_tmp where unix_timestamp(cd_date)<1535727600 3155984 row(s) affected 17.097 sec
gcm_log 삭제
select * from prq_gcm_log limit 1;
select * from prq_gcm_log where unix_timestamp(gc_datetime)<1535727600 limit 1;
-- 1535727600
select count(*) cnt from prq_gcm_log where unix_timestamp(gc_datetime)<1535727600 limit 1;
-- '2,127,070'
delete from prq_gcm_log where unix_timestamp(gc_datetime)<1535727600;
-- 14:46:08 delete from prq_gcm_log where unix_timestamp(gc_datetime)<1535727600 2127070 row(s) affected 14.258 sec
mms_log삭제
select * from prq_mms_log limit 1;
select * from prq_mms_log where unix_timestamp(mm_datetime)<1535727600 limit 1;
-- 1535727600
select count(*) cnt from prq_mms_log where unix_timestamp(mm_datetime)<1535727600 limit 1;
-- '1,148,817'
delete from prq_mms_log where unix_timestamp(mm_datetime)<1535727600;
-- 14:50:50 delete from prq_mms_log where unix_timestamp(mm_datetime)<1535727600 1148817 row(s) affected 11.498 sec
OCID https://prq.co.kr/prq/logs/lists/ocid
GCM https://prq.co.kr/prq/logs/lists/gcm
MMS https://prq.co.kr/prq/logs/lists/mms
위 3가지 DB 삭제요청
기간은 2018년 9월 1일 이전 DB 모두 삭제