Re: CREATE INDEX and HOT - revised design

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Pavan Deolasee <pavan(dot)deolasee(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: CREATE INDEX and HOT - revised design
Date: 2007-03-21 18:55:19
Message-ID: 46017F97.2000408@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Bruce Momjian wrote:
>> Bruce Momjian wrote:
>>>> Also, I am wondering whether the information that which index is used to
>>>> fetch a tuple is always available. I haven't checked, but do we have that
>>>> information in lossy bitmap heapscan ?
>>> Oh, that is an interesting problem because an index might have one index
>>> entry representing an entire HOT chain, while another index might
>>> represent each chain member by individual index entries. When we do the
>>> bitmaps, don't we access them by heap tid, meaning we would find all
>>> entries anyway?
>> I thinking some more, it would be a problem because while we are merging
>> the tids, we are using index entries and haven't looked at the heap yet.
>> I am guessing we would have to exclude the new index from bitmap joins
>> with other indexes until the VACUUM happens.
>
> Thinking some more, bitmap scans have a mode that tracks just the page
> numbers, rather than the tids --- if the index visibilities do not
> match, we would need to fall back to that mode.

You don't need to scan the whole page like in the lossy bitmap mode,
just all the tuples in the HOT-chain.

You need to somehow pass the information that multiple indexes have been
used in the bitmap scan to the bitmap heapscan node, so that it knows
when the extra checking is required.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Grzegorz Jaskiewicz 2007-03-21 18:55:46 Re: [PATCHES] Bitmapscan changes
Previous Message Simon Riggs 2007-03-21 18:43:39 Re: CREATE INDEX and HOT - revised design