Re: Table clustering idea - Mailing list pgsql-hackers

From J. Andrew Rogers
Subject Re: Table clustering idea
Date
Msg-id 10FF0EBD-F9FF-4A32-AD73-D93D1A7D8475@neopolitan.com
Whole thread Raw
In response to Re: Table clustering idea  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
On Jun 27, 2006, at 9:39 AM, Jim C. Nasby wrote:
> I think one of the issues might have been: how will you handle other
> indexes on the table when you can no longer point them at an item  
> (since
> items will need to move to maintain an IOT).


There are clean ways to handle this.  The table is organized on the  
primary key, a typical requirement for IOTs.  Any indexes you add to  
IOT reference the primary key of the heap tuple.  Since the heap and  
PK index are the same thing, external indexes use the PK as the tuple  
identifier.

The only caveat is that this creates performance asymmetries.  IOTs  
have significantly faster access through their primary keys but  
slower external index access since two B-Trees have to be traversed.   
An IOT is typically only used for tables that are only accessed  
through their primary key.  Not supporting external indexes on IOTs  
is a functional implementation (and probably recommended in  
practice), though most real implementations allow external indexes if  
not always in their first version.


J. Andrew Rogers
jrogers@neopolitan.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SO_SNDBUF size is small on win32?
Next
From: "Magnus Hagander"
Date:
Subject: Re: SO_SNDBUF size is small on win32?