Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to exclude queries? #634

Open
jonluca opened this issue Nov 15, 2024 · 1 comment
Open

How to exclude queries? #634

jonluca opened this issue Nov 15, 2024 · 1 comment
Labels

Comments

@jonluca
Copy link

jonluca commented Nov 15, 2024

CleanShot 2024-11-14 at 17 50 38@2x

Two of our most common queries are skewing our database query stats - they both are empty selects, but they occur so frequently they make the rest of our queries look very performant. Is there a way to exclude specific queries by fingerprint, or even just that match a regex?

@lfittl
Copy link
Member

lfittl commented Nov 27, 2024

@jonluca Thanks for the request!

Since you opened this on the collector repository, answering in the context of the data collection:

You can exclude queries from being tracked by Postgres by running "SET pg_stat_statements.track = none" on the connection where you run the query (and then reset it again with "RESET pg_stat_statements.track"). This also excludes them from showing up in the pganalyze query overview.

We don't currently have plans to add other methods to filter out queries in the collector or within the UI, but feedback is of course welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants