Notice: We've updated our Privacy Policy, effective November 14, 2024.

EXPLAIN - Index Only Scan

Description:

This is very similar to an Index Scan, but the data comes directly from the index and the visibility check is handled specially, so it can avoid looking at the table data entirely. An index-only scan is faster, but it’s not always available as an alternative to a regular index scan. It has two restrictions: the index type must support Index-Only Scans (the common btree index type always does) and (somewhat obviously) the query must only project columns included in the index. If you have a SELECT * query but don’t actually need all columns, you may be able to use an index-only scan just by changing the column list.

Important Fields:

  • Filter
  • Heap Fetches
  • Index Cond
  • Rows Removed by Index Recheck
  • Scan Direction

Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →