PostgreSQL Index vs Full Scan: EXPLAIN ANALYZE on 100k / 1M / 5M Rows (Filter + ORDER BY + LIMIT)
·1832 words·9 mins
A reproducible lab showing how a composite index changes the execution plan from (parallel) seq scan + sort to index scan + limit, with EXPLAIN (ANALYZE, BUFFERS) evidence on 100k/1M/5M rows.