ended6일 전· 1 sources

OFFSET Doesn't Skip Rows: What 10M Rows in PostgreSQL Actually Cost

Why it matters

OFFSET 9999980 LIMIT 20 does not skip 9,999,980 rows. It reads every one of them, builds each tuple, and throws it away. To hand back 20 rows it touches 110,659 buffer pages — 865 MB of a 1.2 GB table...

1
Sources
+0
24h
Growth
5d
Active

Sources

Related Issues