I’m using the pt-query-digest tool to understand and explore our MySQL server. The problem is that I want to share the results but I have been told that I need to sanitize the report results before sharing it with colleagues. Is there a way to do so?
For example, the where section can hold clients data for example where ip=client_ip
This is a customization request; you can use tools like sed,awk, etc, to replace strings. There are multiple things in slow query digest reports like table name, column name, etc.
In this case, You can focus on a few slow queries and replace the strings you want and share it.
An alternative is to set up Percona Monitoring and Management (PMM) in this node, and use the Query Analytics (QAN) feature:
With QAN you can benefit from queries being sent to the PMM server without this data to begin with.
Setting up and maintaining PMM is not as trivial as using pt-query-digest, but it will provide much more data and functionality, and you won’t need to manually tune the digest outputs (which is error prone and more labor intensive).