# Loggin all selects only for one table

**URL:** <https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417>\
**Category:** Percona Toolkit\
**Created:** [June 20, 2018, 8:36pm UTC](https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417 "2018-06-20T20:36:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnathos](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@tnathos](https://forums.percona.com/u/tnathos)\
**Post date:** [June 20, 2018, 8:36pm UTC](https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417/1 "2018-06-20T20:36:14Z")

</div>

Hi, i want to know if is possible create a log that catch all selects that are execute only in a table… i found this but i don’t get any information.

sudo tcpdump -s 65535 -x -nn -q -tttt -i any -c 1000 port 3306 | pt-query-digest --type tcpdump --run-time 5s --iterations 0 --filter ‘$event-\>{fingerprint} =~ m/\b(from|join|into)\s+(`?my_database`?.)`?(table_one|table_two|)`?\b/’ --output slowlog --no-report \> mylog.txt

Best!

---

<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:** [June 20, 2018, 9:37pm UTC](https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417/2 "2018-06-20T21:37:06Z")

</div>

Hi,

I would use [pt-kill](https://www.percona.com/doc/percona-toolkit/3.0/pt-kill.html#cmdoption-pt-kill-kill) with --print and --match-info.

Regards

---

<div class="post-metadata">

**Author:** ![tnathos](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@tnathos](https://forums.percona.com/u/tnathos)\
**Post date:** [June 21, 2018, 11:25am UTC](https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417/3 "2018-06-21T11:25:22Z")

</div>

> [@carlos.salguero;51725](#):
>
> Hi,
> 
> I would use [pt-kill](https://www.percona.com/doc/percona-toolkit/3.0/pt-kill.html#cmdoption-pt-kill-kill) with --print and --match-info.
> 
> Regards

Hi but i understand that [pt-kill](https://www.percona.com/doc/percona-toolkit/3.0/pt-kill.html#cmdoption-pt-kill-kill) is for cancel or kill the queries… that is rigth? but i need is log all queries launched in only a table for not use the global log of mysql…

---

<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:** [June 22, 2018, 8:28am UTC](https://forums.percona.com/t/loggin-all-selects-only-for-one-table/6417/4 "2018-06-22T08:28:18Z")

</div>

pt-kill only kill queries if you specify --kill. Using --print only it won’t kill any query
