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

Loggin all selects only for one table

tnathostnathos EntrantCurrent User Role Beginner
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!

Comments

  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    Hi,

    I would use pt-kill with --print and --match-info.

    Regards
  • tnathostnathos Entrant Current User Role Beginner
    Hi,

    I would use pt-kill with --print and --match-info.

    Regards

    Hi but i understand that pt-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..
  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    pt-kill only kill queries if you specify --kill. Using --print only it won't kill any query
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.