pt-query-digest 3.1.0 Analyze slow log error

Mingming.DengMingming.Deng Entrant Participant
An error occurred when I analyzed the slow log using the following command:
[[email protected] ~]# pt-query-digest slow.log --user=root --password=123123 --socket=/mydata/mysql.sock --history D=test --since="2019-10-17 22:00:00" --until="2019-10-18 04:00:00"


  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona

    Could you provide the slow log?
    or could you run query digest putting PTDEBUG=1 pt-query-digest <params> and attach the output?
    I cannot see not reproduce the error you mention.

  • Mingming.DengMingming.Deng Entrant Participant
    Hello ,
    I am running correctly when using the following command
    [[email protected] ~]# pt-query-digest slow.log --user=root --password=123123 --socket=/mydata/mysql.sock --history D=test
    Should I not specify --since and --until when using --history?
  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona

    To read from the slog log without using the history table you can just run pt-query-digest <slow-log-file>
    If you want to use the history table, it is not mandatory to use --since nor --until and the --history parameter should have the DSN to connect to the db where the history will be saved like:
    pt-query-digest <slow-log-file> --history h=,P=3306,u=user,p=password,D=database,t=table

  • Mingming.DengMingming.Deng Entrant Participant
    Ok, thank you very much for your reply.
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.