Re: Optimizing queries that use temporary tables - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Optimizing queries that use temporary tables
Date
Msg-id dcc563d10801221234j3ca441ebs2aee2da9165d1ca3@mail.gmail.com
Whole thread Raw
In response to Optimizing queries that use temporary tables  ("Luiz K. Matsumura" <luiz@planit.com.br>)
List pgsql-performance
On Jan 22, 2008 1:32 PM, Luiz K. Matsumura <luiz@planit.com.br> wrote:
> Hello,
>
> I'm developing some routines that will use temporary tables and need
> advice on how to not lose performance.
>
> I will insert data in a temporary table and use this data to generate
> new sets that will update or add to the same temporary table.
>
> I have some questions that I'm concerned about:
>
> - I can create indexes on this temp table to optimize queries ?

Yes

> If yes...
> - This indexes will be destroyed together (automatic?) the temp table
> when the connection is closed ?

Yes

> - When I insert a lot of new rows, need to run analyze on this temporary
> table ?

Yes

pgsql-performance by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: SELECT * FROM table is too slow
Next
From: "Guillaume Smet"
Date:
Subject: Workaround for cross column stats dependency