Query processing

random_page_cost

Also called: random page cost, planner cost constant

random_page_cost is the planner's estimate of how expensive a random disk read is, relative to a sequential read fixed at 1.0. The default of 4.0 says a random read is modelled as four times costlier than a sequential one.

What this means

The planner's price tag for a random disk read, measured against a sequential read that's fixed at 1.0. The default 4.0 says "a random read costs about four times a sequential one." Lower it on fast SSDs and index scans start to look cheaper, so the planner reaches for them more often.

Why it matters operationally

This single number heavily influences whether the planner prefers an index scan (lots of random reads) or a sequential scan. On SSDs or well-cached data, the default 4.0 is often too high; lowering it toward 1.1 makes index paths fairly costed and can fix needless sequential scans.

← All glossary terms · GUC reference · Error catalog