Set up automatic EXPLAIN plan collection
Pre-requisites
- Automatic explain plan collection requires Log Insights to be set up successfully
Choose integration method
pganalyze integrates with two mechanisms for collecting EXPLAIN plans automatically:
- auto_explain
Postgres collects EXPLAIN (or EXPLAIN ANALYZE) data as part of query processing, based onauto_explain.log_min_duration
, reflecting the actual plan that was used - Log-based EXPLAIN
pganalyze collector runs EXPLAIN (without ANALYZE) on all queries logged based onlog_min_duration_statement
, after the query has completed
Generally we recommend utilizing auto_explain where available, as it provides higher data quality.
Log-based EXPLAIN is not guaranteed to show the same plan that was executed, and cannot show execution metrics like I/O timing or buffer usage.
Supported platforms
Platform | Log-based EXPLAIN | auto_explain |
---|---|---|
Amazon RDS | Yes | Yes (Recommended) |
Azure Database | Yes | No |
Google Cloud SQL | Yes | No |
Heroku Postgres | Yes | No |
Self-managed VM | Yes | Yes (Recommended) |
Kubernetes | No | No |
Other PaaS | No | No |
We are constantly evaluating new platform to support - please reach out if you're missing an integration, to help us prioritize.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →