Implement functionality of pt-archiver --purge - in pure SQL as a stored procedure.
Initially, we will need only the following parameters, as they exist in pt-archiver:
--database
--source
--dest (initially only NULL until archiving part is implemented)
--where
--sleep
--commit-each
--txn-size
Should be implemented by using a single once-prepared statement, executed multiple times with EXECUTE ... USING ... for optimal performance.
This should make it significantly faster in some cases than pt-archiver, because it will evade the communication overhead between pt-archiver and the database.
Implement functionality of
pt-archiver --purge
- in pure SQL as a stored procedure. Initially, we will need only the following parameters, as they exist in pt-archiver:Should be implemented by using a single once-prepared statement, executed multiple times with
EXECUTE ... USING ...
for optimal performance.This should make it significantly faster in some cases than pt-archiver, because it will evade the communication overhead between pt-archiver and the database.