tubeshowcase●1,672,197 videos♡ My collection 0
← Learn to Code

Learn to Code27:00

random_page_cost in Postgres - why the default is 4.0 and should you lower it? | POSETTE 2026

Microsoft Developer ↗

From the creator

Should you lower random_page_cost on SSDs in Postgres? Tomas Vondra (Microsoft) explores this question in his talk “random_page_cost in Postgres - why the default is 4.0 and should you lower it?” at POSETTE: An Event for Postgres 2026. Abstract: random_page_cost is one of the basic parameters affecting query planning in PostgreSQL. It expresses the cost of random I/O in relation to sequential reads. The lower the value, the "cheaper" the operations performing random I/O -- typically Index Scans. Since 2002 the default value is set to 4.0, but how did we pick it and why didn't it change over the ~25 years? The storage changed a lot over the years. And should you reduce it when running on SSDs? Tomas Vondra (Microsoft) is a long-term PostgreSQL contributor & committer, focusing on performance, query planning & optimization, etc. ► Video chapters: ⏩ 00:00 – Music & introduction ⏩ 00:28 – Agenda and key questions to answer ⏩ 00:45 – How Postgres cost-based planning works ⏩ 02:05 – Sequential vs random I/O explained ⏩ 03:40 – Breaking down cost formulas and parameters ⏩ 07:50 – Where the default value 4.0 comes from ⏩ 10:40 – Re-running old experiments on modern hardware ⏩ 13:20 – Measuring real I/O costs with explain analyze ⏩ 15:35 – Surprising results from SSDs and spinning disks ⏩ 18:25 – Why higher costs can hurt overall performance ▶️ 22:37 – Should you lower random_page_cost? ▶️ 24:10 – Practical tuning advice and trade-offs 📕 Everything you need to know about POSETTE:

Published 2026-06-16 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code