index_advisor
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
index_advisor | 0.2.0 | FEAT | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2800 | index_advisor | No | No | No | Yes | No | Yes | - |
| Related | hypopg hypopg online_advisor pg_qualstats pg_hint_plan pg_stat_plans plan_filter pg_track_optimizer pg_strom pg_orca pg_relusage |
|---|
Upstream 0.2.1; pkg 0.2.0; planner estimates only.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.2.0 | 1817161514 | index_advisor | hypopg |
| RPM | PIGSTY | 0.2.0 | 1817161514 | index_advisor_$v | - |
| DEB | PIGSTY | 0.2.0 | 1817161514 | postgresql-$v-index-advisor | - |
Build
You can build the RPM / DEB packages for index_advisor using pig build:
Install
You can install index_advisor directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
index_advisor 0.2.1 uses HypoPG to compare planner costs with hypothetical indexes. It returns recommendations, not measured execution-time guarantees, and does not create the recommended physical indexes.
Core Workflow
Install the required hypopg extension first, with the privileges its installation requires. This SQL extension needs no preload or restart.
index_advisor(query text) accepts a parameterized query and returns before/after startup and total cost values, index_statements and errors. Inspect the suggested DDL and real workload before creating an index. View and materialized-view support depends on what the advisor can resolve to underlying tables.
0.2.1 Corrections and Limits
Version 0.2.1 fixes qualification of HypoPG calls when HypoPG uses another schema, non-greedy removal of comments, and cleanup of the advisor’s own prepared statement. Update installed databases with ALTER EXTENSION index_advisor UPDATE TO '0.2.1' after installing the new SQL files.
Run analysis with deliberate table permissions and representative statistics. Planning cost does not account for every operational cost: additional indexes consume disk and slow writes, and should be validated against production query shapes before deployment.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)