Good morning I have a problem with percona. I am using percona 2.22 to monitor a postrges 11.10 database. I have a capture of the queries for the last few hours but while selecting the queries I can see the details and the table but I cannot see the example. I get:
Sorry, no examples found for this query
This happens for the default database postgres and for the database I am interested.
Any ideas why this might happen? Maybe I have done a mistake in my configuration?
I assume you’re using the built-in pg_stat_statements method of capturing query data which doesn’t actually capture the raw query to give examples…it strips it down to a more generic query gives it a fingerprint and then starts aggregating stats by fingerprint.
There is an extension in tech preview from Percona called pg_stat_monitor that will actually capture query examples so you can not only see the generic query but examples with the full where clauses. Just know that this will show the exact query posed to the DB so take good care not to inadvertently expose sensitive data to people who might not otherwise be allowed to view it.
Thank you for your reply.
Yes you are right I am using the classic approach with pg_stat_statements. How accurate are the execution timings for the provided queries?
With pg_stat_monitor I will have the ability to see also explain plans? Queries with bind variables have full example provided or they remain bind variables?
I am trying to understand what this exact query means.
This blog article will help with all the goodness of pg_stat_monitor. Because we’ll have the full query we can actually run an explain against it to help understand the query execution better.
Here’s a blog on how to install pg_stat_monitor and the link I sent above shows how to have PMM use pg_stat_monitor provide stats (I wouldn’t recommend using both although it is possible…just double load on your system).