---
title: "Easier Postgres fine-tuning with online_advisor"
description: "online_advisor is a Postgres extension that hooks into the executor (like auto_explain) to watch the live workload and recommend indexes, extended statistics, or prepared statements without applying anything automatically."
url: "https://swe.quest/articles/easier-postgres-fine-tuning-with-online-advisor-fe9a8f6b2841792d"
canonical: "https://neon.com/blog/easier-postgres-fine-tuning-with-online_advisor"
source: "Neon"
published: "2025-09-16"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["postgres","performance","query-engines"]
---

# Easier Postgres fine-tuning with online\_advisor

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-09-16, 4 min read, How-to. Original: [https://neon.com/blog/easier-postgres-fine-tuning-with-online\_advisor](https://neon.com/blog/easier-postgres-fine-tuning-with-online_advisor)

## Summary

online\_advisor is a Postgres extension that hooks into the executor (like auto\_explain) to watch the live workload and recommend indexes, extended statistics, or prepared statements without applying anything automatically. It suggests indexes when a predicate filters more than 1,000 rows (filtered\_threshold), multivariate statistics when actual rows exceed estimates by 10x (misestimation\_threshold), and prepared statements when planning time exceeds execution time (prepare\_threshold 1.0). Recommendations are queried from proposed\_indexes and proposed\_statistics views with call counts and elapsed time, and the reader then creates the object and runs VACUUM ANALYZE. It supports Postgres 14–17, though Neon offers it only on 17.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Query engines](https://swe.quest/tags/query-engines.md) (Data & databases)

## Prerequisites

- Postgres indexes ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Postgres query planner basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

online\_advisor, Neon, auto\_explain, extended statistics, prepared statements

## Related posts

- [Performance tips for Neon Postgres](https://swe.quest/articles/performance-tips-for-neon-postgres-9739985c47432424.md): Neon · 2024-04-04 · Medium · 8 min read · PostgreSQL, Performance engineering, Serverless, SQL
  Neon's serverless Postgres follows mostly standard Postgres tuning, plus a few Neon-specific checks.
- [Postgres Support Recap: Investigating Postgres Query Performance](https://swe.quest/articles/postgres-support-recap-investigating-postgres-query-performance-82d2d3f876d71410.md): Neon · 2024-02-29 · Medium · 9 min read · PostgreSQL, Performance engineering, SQL, Observability
  Three starting points for diagnosing slow Postgres queries: use pg\_stat\_statements to find long-running queries by mean execution time and then EXPLAIN ANALYZE them, check the cache hit ratio (in Neon via the neon\_stat\_file\_cache view, since Neon extends shared buffers with a local file cache), and look for table and index bloat caused by MVCC dead tuples.
- [The 10 Most Popular Postgres Extensions on Neon](https://swe.quest/articles/the-10-most-popular-postgres-extensions-on-neon-732f7020bbe3e6dc.md): Neon · 2025-08-21 · Easy · 5 min read · PostgreSQL, SQL, Databases
  The ten most installed Postgres extensions across Neon's platform are plpgsql and pg\_stat\_statements (each in 1M+ databases), followed by uuid-ossp, pgvector, pgcrypto, pg\_trgm, PostGIS, citext, unaccent and hstore.
- [Debug your Postgres from the terminal: a tour of \`neon inspect db\`](https://swe.quest/articles/debug-your-postgres-from-the-terminal-a-tour-of-neon-inspect-db-388ae9813e34917e.md): Neon · 2026-07-22 · Medium · 10 min read · PostgreSQL, Observability, Developer tools, Performance engineering, Replication
  \`neon inspect db\` adds fourteen read-only Postgres diagnostic subcommands to the Neon CLI, each running one curated query against Postgres statistics and catalog views (table/index sizes, bloat, unused indexes, seq scans, long-running queries, locks, pg\_stat\_statements outliers and calls, vacuum stats, replication slots, subscriptions).
- [6 tips to optimize storage costs for your Postgres databases](https://swe.quest/articles/6-tips-to-optimize-storage-costs-for-your-postgres-databases-11da5e875c34786c.md): Neon · 2024-03-15 · Medium · 4 min read · PostgreSQL, Cost optimization, Storage engines
  Six ways to shrink Postgres storage spend: drop unused indexes (found via pg\_stat\_user\_indexes and pg\_index), avoid full database copies for dev and staging by using Neon's copy-on-write branching, choose smaller data types like SMALLINT, order columns largest to smallest to cut alignment padding, shorten Neon's history retention window, and tune autovacuum to limit bloat.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
