---
title: "All Your GUCs in a Row: enable_indexonlyscan"
url: https://daily.dev/posts/all-your-gucs-in-a-row-enable-indexonlyscan-s3vvm0cff
source_url: https://postgr.es/p/9nM
type: article
source: "Planet PostgreSQL"
published: 2026-06-30T01:01:24.908Z
updated: 2026-06-30T01:01:49.451Z
tags: ["postgresql"]
reading_time: 5
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# All Your GUCs in a Row: enable_indexonlyscan

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 5 min read · 0 upvotes · 0 comments

## Summary

PostgreSQL's index-only scan can skip heap reads entirely when every needed column is in the index, potentially delivering 2-20x speedups. However, the critical catch is that MVCC visibility information lives in the heap, not the index. The visibility map (a per-table bitmap maintained by VACUUM) is what makes index-only scans actually work: if a heap page's all-visible bit is set, no heap fetch is needed. On actively-changing tables where autovacuum can't keep up, an index-only scan plan can silently degrade into heavy heap I/O. The diagnostic tool is EXPLAIN (ANALYZE)'s 'Heap Fetches:' counter — a high count means a stale visibility map, and the fix is tuning autovacuum (lower autovacuum_vacuum_scale_factor), not disabling the GUC. The enable_indexonlyscan GUC is a diagnostic instrument: turn it off temporarily to compare plans, not a permanent tuning knob.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9nM>

## Similar posts on daily.dev

- [All Your GUCs in a Row: enable\_indexscan and enable\_bitmapscan](https://daily.dev/posts/all-your-gucs-in-a-row-enable-indexscan-and-enable-bitmapscan-cifajzmnh) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: enable\_seqscan](https://daily.dev/posts/all-your-gucs-in-a-row-enable-seqscan-ope0ha3wx) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: ignore\_system\_indexes](https://daily.dev/posts/all-your-gucs-in-a-row-ignore-system-indexes-pcn2jtsfs) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: enable\_tidscan](https://daily.dev/posts/all-your-gucs-in-a-row-enable-tidscan-drzhi1z34) · Planet PostgreSQL · 1 upvotes · 0 comments
- [All Your GUCs in a Row: enable\_incremental\_sort](https://daily.dev/posts/all-your-gucs-in-a-row-enable-incremental-sort-xf4skwqco) · Planet PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/all-your-gucs-in-a-row-enable-indexonlyscan-s3vvm0cff)
