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.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to