Re: mosbench revisited - Mailing list pgsql-hackers

From Tom Lane
Subject Re: mosbench revisited
Date
Msg-id 23078.1312403896@sss.pgh.pa.us
Whole thread Raw
In response to Re: mosbench revisited  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: mosbench revisited
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Aug 3, 2011 at 3:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> (If the query ended up being a seqscan, I'd expect a second
>> lseek(SEEK_END) when the executor starts up, but I gather from the other
>> complaints that the mosbench people were only testing simple indexscan
>> queries.)

> Yeah, it seems that for a sequential scan we lseek the heap, then the
> index, then the heap again; but for index scans we just hit the heap
> and the index.

Sure.  The first two come from the planner getting the table and index
sizes for estimation purposes (look in plancat.c).  The last is done in
heapam.c's initscan().  We could possibly accept stale values for the
planner estimates, but I think heapam's number had better be accurate.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: mosbench revisited
Next
From: Simon Riggs
Date:
Subject: Locking end of indexes during VACUUM