PostgreSQL - Indexing Strategies
You want to optimize a query
SELECT id, status FROM orders WHERE status = 'shipped'; for index-only scans. The current index is on (id). What is the best way to enable index-only scans?