Re: proposal for smaller indexes on index-ordered tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeffrey Baker" <jwbaker(at)gmail(dot)com>
Cc: "Zoltan Boszormenyi" <zb(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: proposal for smaller indexes on index-ordered tables
Date: 2008-06-24 21:38:30
Message-ID: 6669.1214343510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jeffrey Baker" <jwbaker(at)gmail(dot)com> writes:
> I'm quite aware of the problems of maintaining such a table and index, but
> the fact is that data warehouse type tables may never be updated after being
> created. The particular application I'm struggling with does a SELECT ...
> INTO ... ORDER BY to make an ordered table for querying every night. The
> problem is it takes longer, much longer, to create the index than to create
> the table, and in the end the index is as big as half the table anyway.

There's something wrong with that: sorting the table rows surely ought
to take longer than sorting the same number of (smaller) index entries.
Have you done any profiling to find out what the problem is? Perhaps
there's something wrong with the setting of maintenance_work_mem (vs
work_mem).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeffrey Baker 2008-06-24 21:47:41 Re: proposal for smaller indexes on index-ordered tables
Previous Message Zoltan Boszormenyi 2008-06-24 21:36:39 Re: proposal for smaller indexes on index-ordered tables