How to speed up pt-archiver

I have a table with 110000000 rows. it has a created_date column and an ID column. I have indexes on both the columns. I am running pt-archiver --limit 10000 --progress 10000 --txn-size 10000 where “created_date < ‘2022-01-01’”

the archival process is very slow, 10000 records/sec. Am I doing something wrong? this way it would take weeks to archive

1 Like

Hello, you can try running as follows:

PTDEBUG=1 pt-archiver --limit 10000 --progress 10000 --txn-size 10000 where “created_date < ‘2022-01-01’”

then check the output to make sure the proper index is being used. Also you might want to try the --bulk-delete and --primary-key-only options which should be faster.

1 Like