pg_stat_plans
Track per-plan call counts, execution times, and example EXPLAIN texts.
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_stat_plans | 2.1.0 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6050 | pg_stat_plans | No | Yes | Yes | Yes | No | Yes | - |
| Related | pg_stat_statements pg_store_plans pg_show_plans pg_stat_kcache |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 2.1.0 | 1817161514 | pg_stat_plans | - |
| RPM | PGDG | 2.1.0 | 1817161514 | pg_stat_plans_$v | - |
| DEB | PGDG | 2.1.0 | 1817161514 | postgresql-$v-pg-stat-plans | - |
Install
You can install pg_stat_plans directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pg_stat_plans; # Install for current active PG version
pig ext install -y pg_stat_plans -v 18 # PG 18
pig ext install -y pg_stat_plans -v 17 # PG 17
pig ext install -y pg_stat_plans -v 16 # PG 16
dnf install -y pg_stat_plans_18 # PG 18
dnf install -y pg_stat_plans_17 # PG 17
dnf install -y pg_stat_plans_16 # PG 16
apt install -y postgresql-18-pg-stat-plans # PG 18
apt install -y postgresql-17-pg-stat-plans # PG 17
apt install -y postgresql-16-pg-stat-plans # PG 16
Preload:
shared_preload_libraries = '$libdir/pg_stat_plans';
Create Extension:
CREATE EXTENSION pg_stat_plans;
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.