index_advisor
Query index advisor
index_advisor : Query index advisor
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2800 | index_advisor | index_advisor | 0.2.0 |
FEAT | PostgreSQL | SQL |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| ----d-r | No | No | No | Yes | yes | no |
| Relationships | |
|---|---|
| Requires | hypopg |
| See Also | hypopg online_advisor pg_qualstats pg_hint_plan pg_stat_plans plan_filter pg_track_optimizer pg_strom pg_orca pg_relusage |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.2.0 |
18 17 16 15 14 | index_advisor |
hypopg |
| RPM | PIGSTY | 0.2.0 |
18 17 16 15 14 | index_advisor_$v |
- |
| DEB | PIGSTY | 0.2.0 |
18 17 16 15 14 | postgresql-$v-index-advisor |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| el8.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| el9.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| el9.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| el10.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| el10.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| d12.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| d12.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| d13.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| d13.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u22.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u22.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u24.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u24.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u26.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
| u26.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 |
Source
github.com/supabase/index_advisor
index_advisor-0.2.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
index_advisor analyzes a SQL query and recommends indexes that would improve its execution time, reporting before/after cost estimates and the DDL statements to create the suggested indexes.
Function
Basic Example
Returns cost improvements and the recommended CREATE INDEX statement.
Multi-Table Example
The output includes multiple index recommendations across the joined tables with before/after cost comparisons.
Features
- Supports parameterized queries using
$1,$2syntax - Handles materialized views
- Resolves underlying tables and columns behind views
- Depends on HypoPG for hypothetical index evaluation