# pt-query-digest 3.1.0 Analyze slow log error

**URL:** <https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247>\
**Category:** Percona Toolkit\
**Created:** [October 18, 2019, 3:47am UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247 "2019-10-18T03:47:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mingming.Deng](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mingming.Deng](https://forums.percona.com/u/Mingming.Deng)\
**Post date:** [October 18, 2019, 3:47am UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247/1 "2019-10-18T03:47:55Z")

</div>

An error occurred when I analyzed the slow log using the following command：  
[root@minghost ~]# 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”

 ![photoid=54770](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/9/94a628054471c95d4b376c7bc61ccd71824edfa1.jpeg)

---

<div class="post-metadata">

**Author:** ![carlos.salguero](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/carlos.salguero/32/20_2.png) [@carlos.salguero](https://forums.percona.com/u/carlos.salguero)\
**Post date:** [October 21, 2019, 6:26am UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247/2 "2019-10-21T06:26:08Z")

</div>

Hello,

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

Regards

---

<div class="post-metadata">

**Author:** ![Mingming.Deng](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mingming.Deng](https://forums.percona.com/u/Mingming.Deng)\
**Post date:** [October 23, 2019, 2:20am UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247/3 "2019-10-23T02:20:51Z")

</div>

Hello ，  
I am running correctly when using the following command  
[root@minghost ~]# 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?

---

<div class="post-metadata">

**Author:** ![carlos.salguero](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/carlos.salguero/32/20_2.png) [@carlos.salguero](https://forums.percona.com/u/carlos.salguero)\
**Post date:** [October 25, 2019, 5:04am UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247/4 "2019-10-25T05:04:03Z")

</div>

Hello,

To read from the slog log without using the history table you can just run pt-query-digest   
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 --history h=127.0.0.1,P=3306,u=user,p=password,D=database,t=table

Regards

---

<div class="post-metadata">

**Author:** ![Mingming.Deng](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mingming.Deng](https://forums.percona.com/u/Mingming.Deng)\
**Post date:** [November 7, 2019, 9:41pm UTC](https://forums.percona.com/t/pt-query-digest-3-1-0-analyze-slow-log-error/7247/5 "2019-11-07T21:41:39Z")

</div>

Ok, thank you very much for your reply.
