Re: SeqScan costs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SeqScan costs
Date
Msg-id 18353.1218674640@sss.pgh.pa.us
Whole thread Raw
In response to Re: SeqScan costs  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> That means going to the index meta page, find the fast root pointer, look up
> that page, look at the single leaf page pointer, look up that page, and do a
> binary search of the 200 leaf pointers. Once you find the resulting match,
> look up the heap page and *then* go directly to the right tuple.

Actually, the metapage access has been cached for some time, and there's
not going to be a separate root page if you only have 1 page worth of
index entries.  But yeah, for large indexes there are going to be
multiple page accesses before you find what you want.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: WIP: patch to create explicit support for semi and anti joins
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] autovacuum: use case for indenpedent TOAST table autovac settings