online_advisor
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
online_advisor | 1.0 | ADMIN | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5270 | online_advisor | No | Yes | Yes | Yes | No | Yes | - |
| Related | pg_qualstats hypopg index_advisor pg_hint_plan pg_stat_plans plan_filter pg_relusage pg_track_optimizer pg_strom pg_orca |
|---|
Requires shared_preload_libraries=online_advisor on PostgreSQL 14-16; PGSTY backports upstream PG18 hook compatibility.
Version
| OS / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 1.0 el8.x86_64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | N/A | PIGSTY 1.0 el8.aarch64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | N/A | PIGSTY 1.0 el9.x86_64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | N/A | PIGSTY 1.0 el9.aarch64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | N/A | PIGSTY 1.0 el10.x86_64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | N/A | PIGSTY 1.0 el10.aarch64.pg18 : online_advisor_18 online_advisor_18-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg17 : online_advisor_17 online_advisor_17-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg16 : online_advisor_16 online_advisor_16-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg15 : online_advisor_15 online_advisor_15-1.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | N/A | PIGSTY 1.0 d12.x86_64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | N/A | PIGSTY 1.0 d12.aarch64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | N/A | PIGSTY 1.0 d13.x86_64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | N/A | PIGSTY 1.0 d13.aarch64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | N/A | PIGSTY 1.0 u22.x86_64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | N/A | PIGSTY 1.0 u22.aarch64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | N/A | PIGSTY 1.0 u24.x86_64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | N/A | PIGSTY 1.0 u24.aarch64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | N/A | PIGSTY 1.0 u26.x86_64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | N/A | PIGSTY 1.0 u26.aarch64.pg18 : postgresql-18-online-advisor postgresql-18-online-advisor_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg17 : postgresql-17-online-advisor postgresql-17-online-advisor_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg16 : postgresql-16-online-advisor postgresql-16-online-advisor_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg15 : postgresql-15-online-advisor postgresql-15-online-advisor_1.0-1PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for online_advisor using pig build:
Install
You can install online_advisor directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources:
- Official README for version 1.0
- Extension control file
- Version 1.0 SQL objects
- Sample preload configuration
online_advisor observes PostgreSQL execution plans and workload timing, then recommends indexes, extended statistics, or prepared statements. It reports candidates only; it never creates an index or statistics object automatically.
Core Workflow
Preload the library and restart PostgreSQL:
Create and activate the extension in each database whose workload should be observed:
After representative workload has run, inspect the recommendations:
Review each generated create_index or create_statistics statement before applying it. Run ANALYZE after creating an index or statistics object so the planner can use current statistics.
Objects and Settings
proposed_indexes: view overpropose_indexes(combine, reset)with filtering volume, call count, elapsed time, and a candidateCREATE INDEXstatement.proposed_statistics: view overpropose_statistics(combine, reset)with misestimation, call count, elapsed time, and a candidateCREATE STATISTICSstatement.get_executor_stats(reset): returns aggregate planning and execution time, query count, and planning-overhead ratios.online_advisor.filtered_threshold: minimum filtered-row count considered for an index proposal; default1000.online_advisor.misestimation_threshold: actual-to-estimated row ratio considered for statistics; default10.online_advisor.min_rows: minimum returned rows for misestimation analysis; default1000.online_advisor.max_index_proposalsandonline_advisor.max_stat_proposals: proposal capacities; set them before the extension is activated.online_advisor.do_instrumentation,online_advisor.log_duration, andonline_advisor.prepare_threshold: control collection and prepared-statement advice.
Caveats
- Instrumentation adds workload overhead; measure it on the target system and disable collection when it is not needed.
- The index heuristic does not reason about operator ordering in compound indexes, join indexes, or indexes used only to avoid sorting.
- The extension does not estimate the benefit of a proposed index. Use plan review or a hypothetical-index tool before building expensive indexes.
- Advice is database-local and depends on the workload observed since activation or reset.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)