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

pt-log-player split issue

ggreenggreen EntrantInactive User Role Beginner
I am new to using this tool and I'm having problems splitting my log file based on Schema.
I run the following command against my log file but it never generates any files:

pt-log-player --split Schema --session-files 32 --filter '$event->{arg} =~ m/^select/i' --base-dir benchmark/session-files slow-log</pre>

If I do modify the command to split randomly:

pt-log-player --split-random --session-files 32 --filter '$event->{arg} =~ m/^select/i' --base-dir benchmark/session-files slow-log</pre>

a directory is created under benchmark/session-files with 32 files named session-N.txt which contain select statements.

What am I missing when trying to split based on Schema?

Thanks
Graham

Comments

  • xaprbxaprb Mentor Inactive User Role Beginner
    Does your log file have a Schema attribute in the events?
  • ggreenggreen Entrant Inactive User Role Beginner
    Thanks for the response Baron.

    I guess I was mis-understanding how the tool was determining the schema. I was making the assumption this string

    # [email protected]: schema_name[user] @ [host]</pre>

    was used to determine the schema.

    I now see that Schema is a Percona Server specific attribute for the slow query log, it would be helpful to note that in the pt-log-player documentation for those not familiar with Percona Server.
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.