From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Jonathan Vanasco <postgres(at)2xlp(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: temporary indexes? |
Date: | 2015-10-21 23:00:27 |
Message-ID: | 5628190B.4020106@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 with open 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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | NTPT | 2015-10-22 01:34:43 | Migrate whole cluster to utf8 |
Previous Message | John R Pierce | 2015-10-21 22:10:55 | Re: trouble downloading postgres 9.4 for RHEL 6.x |