Re: Bitmapscan changes

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Patches <pgsql-patches(at)postgresql(dot)org>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Subject: Re: Bitmapscan changes
Date: 2007-03-12 20:13:10
Message-ID: 45F5B456.8020208@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Heikki Linnakangas wrote:
> Tom Lane wrote:
>> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
>>> Tom Lane wrote:
>>>> In the second place, this seems to
>>>> forever kill the idea of indexscans that don't visit the heap --- not
>>>> that we have any near-term prospect of doing that, but I know a lot of
>>>> people remain interested in the idea.
>>
>>> I'm certainly interested in that. It's not really needed for
>>> clustered indexes, though. A well-clustered index is roughly one
>>> level shallower, and the heap effectively is the leaf-level,
>>> therefore the amount of I/O you need to fetch the index tuple + heap
>>> tuple, is roughly the same that as fetching just the index tuple from
>>> a normal b-tree index.
>>
>> That argument ignores the fact that the heap entries are likely to be
>> much wider than the index entries, due to having other columns in them.
>
> True, that's the "roughly" part. It does indeed depend on your schema.
> As a data point, here's the index sizes (in pages) of a 140 warehouse
> TPC-C database:

Ah, I see now that you didn't (necessarily) mean that the clustering
becomes inefficient at reducing the index size on wider tables, but that
there's much more heap pages than leaf pages in a normal index. That's
true, you might not want to use clustered index in that case, to allow
index-only scans. If we had that feature, that is.

Often, though, when using index-only scans, columns are added to the
index to allow them to be returned in an index-only scans. That narrows
the gap a bit.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-03-12 20:18:04 Re: autovacuum next steps, take 3
Previous Message Alvaro Herrera 2007-03-12 20:12:49 Re: autovacuum next steps, take 3

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-03-12 20:46:27 Re: Bitmapscan changes
Previous Message Alvaro Herrera 2007-03-12 19:32:35 Re: Packed varlena patch update