Re: Startup cost of sequential scan - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Startup cost of sequential scan
Date
Msg-id 26910.1535665116@sss.pgh.pa.us
Whole thread Raw
In response to Re: Startup cost of sequential scan  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Whose mental model?  I guess the Tom Lane mind is the canonical one
> for this project, but I'm not sure that it entirely agrees with mine.

Since the fact that we have a notion of startup cost at all is entirely my
fault, I don't feel shy about claiming to have the authoritative view of
what it means.

(Whether that's adequately documented is another question :-()

> IIRC, it was previously proposed that we ought to charge
> random_page_cost for the first block of a sequential scan, because at
> present the cost of fetching 1 block differs depending on whether we
> are fetching it from a heap or an index, which seems unprincipled.

That might well be a sane thing to do ... but it'd still be part of run
cost not startup cost.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 10.5 but not 10.4: backend startup during reindex system: could not read block 0 in file "base/16400/..": read only 0 of 8192 bytes
Next
From: Thomas Munro
Date:
Subject: Re: B-tree cache prefetches