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

From Takahiro Itagaki
Subject Re: A thought on Index Organized Tables
Date
Msg-id 20100223150914.A188.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: A thought on Index Organized Tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: A thought on Index Organized Tables
List pgsql-hackers
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" ?

Use index full scans. We can do it even for now with enable_seqscan = off.
Of course, it requires an additional step to merge index keys and heap tuples.

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

> If you can't do either of those without great expense, I think
> a savings on primary-key lookups is not going to be adequate
> recompense.

I don't think it will be the default, but it would be a reasonable trade-off
for users who want IOTs, unless they often scan the whole table.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pretty print viewdefs
Next
From: Tom Lane
Date:
Subject: Re: A thought on Index Organized Tables