Re: A thought on Index Organized Tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A thought on Index Organized Tables
Date
Msg-id 12408.1266906238@sss.pgh.pa.us
Whole thread Raw
In response to Re: A thought on Index Organized Tables  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: A thought on Index Organized Tables
List pgsql-hackers
Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp> writes:
>>> Instead, how about excluding columns in primary keys from table data?
>> 
>> How will you implement "select * from mytable" ?  Or even
>> "select * from mytable where non_primary_key = something" ?

> Also, we're using the same technique for TOASTed values. The cost can be
> compared with "select * from mytable where toasted_value = something", no?

No, because toast pointers point in the direction you need to traverse.
AFAICS, this proposal involves scanning the whole index to find the
matching entry, because the available pointers link from the wrong end,
that is from the index to the table.

There are also some fairly fatal problems associated with commands like
ALTER TABLE DROP PRIMARY KEY, but I see no need to worry about that
because you haven't even made a case that there's a net performance
gain possible here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Re: A thought on Index Organized Tables
Next
From: Takahiro Itagaki
Date:
Subject: Re: A thought on Index Organized Tables