Re: No heap lookups on index

From: Josh Berkus <josh(at)agliodbs(dot)com>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: No heap lookups on index
Date: 2006-01-19 18:19:01
Message-ID: 43CFD815.2000802@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Jonah,

> David has stated that the index to heap visibility check is slowing him
> down, so what are the possible options:
>
> - Visibility in indexes (-hackers archives cover the pros/cons)
> - True organized heaps
> - Block level index (Tom/Simon's earlier discussion)

also
- Frozen relations

This last solution was proposed as a possibility for the data
warehousing case. For a time-partitioned table, we're going to know
that all but one of the partitions has not been updated anywhere within
visible transaction scope, and therefore index-only access is a possibility.

also
- join tables

One of the other most valuable targets for index-only access is the
"many-to-many join table" whose primary key consists of two (or more)
foreign keys to two (or more) other tables. It's actually not necessary
to check visibility on this kind of table as the visibility of tuples in
the join table will be determined by the visibility of tuples in the two
data tables. Since often join tables consist *only* of the join key,
being able to do index-only access on them could dramatically speed up
certian kinds of queries.

Both of the above are "corner cases" but are very common ones and might
be much easier to implement than the other solutions.

--Josh

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Scott 2006-01-19 18:29:01 Re: No heap lookups on index
Previous Message Josh Berkus 2006-01-19 18:01:57 Re: FW: Surrogate keys (Was: enums)

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-01-19 18:23:16 Re: 8.0.5 Bug in unique indexes?
Previous Message Josh Berkus 2006-01-19 18:11:51 Re: Surrogate keys (Was: enums)