Re: temporary indexes? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: temporary indexes?
Date
Msg-id 5628190B.4020106@aklaver.com
Whole thread Raw
In response to Re: temporary indexes?  (Jonathan Vanasco <postgres@2xlp.com>)
List pgsql-general
On 10/21/2015 01:28 PM, Jonathan Vanasco wrote:
>
> On Oct 21, 2015, at 3:42 PM, Adrian Klaver wrote:
>
>> I misunderstood then. The only thing I can think of is to wrap in a transaction, though that presents other issues
withopen transactions and/or errors in the transaction. 
>
> I just explicitly drop.  The convenience of an auto-drop would be a nice backup.
>
> Transactions and table-locking issues are probably why temporary indexes don't exist.
>

On later versions there is CREATE INDEX CONCURRENTLY which alleviates
locking issues at the expense of time. I would think the greater issue
is the time and overhead of building an index for a table of any size
would eat into 'temporary'. Seems if you are joining temporary tables
against permanent tables on a regular basis it would pay just to keep
the indexes on the permanent tables and pay the expense over a longer
period of time.

--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: trouble downloading postgres 9.4 for RHEL 6.x
Next
From: NTPT
Date:
Subject: Migrate whole cluster to utf8