Not the answer you need?
Register and ask your own question!

pt-query-digest stops digesting log when it encounters DELETE statement

cplummercplummer EntrantInactive User Role Beginner
I'm trying to digest some slow query logs but pt-query-digest appears to stop working when it encounters a DELETE statement. The tool still takes a long time so it would appear that it is digesting the entire file but fails to report the DELETE statements in the report. It will either give me only the DELETE statement and then fail to give me everything else or only give me the other statements without the DELETE statement.

Here is the DELETE statement from the slow query log file:

# [email protected]: abc[abc] @ [##.#.#.#]
# Query_time: 0.013774 Lock_time: 0.000049 Rows_sent: 0 Rows_examined: 16094
use my_db;
SET timestamp=1420780225;
DELETE FROM sessions WHERE date_modified < '2015-01-07 22:10:25';

When I execute pt-query-digest I do it like this: /opt/percona-toolkit-2.2.12/bin/pt-query-digest /opt/slow_query.log > /opt/slow_query_report.txt

Anyone know why the tool is failing to put the DELETE statements into the report?


  • mirfanmirfan Database Administrator Inactive User Role Beginner
    Can you please run pt-query-digest with PTDEBUG=1. This will generate lots of debugging output and will help to identify what causing the issue.

    $ PTDEBUG=1 <pt-query-digest command > output.log 2>&1
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.