pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Optimizing queries that use temporary tables 2+ messages / 2 participants [nested] [flat]
* Optimizing queries that use temporary tables @ 2008-01-22 19:32 Luiz K. Matsumura <luiz@planit.com.br> 0 siblings, 1 reply; 2+ messages in thread From: Luiz K. Matsumura @ 2008-01-22 19:32 UTC (permalink / raw) To: pgsql-performance 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 ? If yes... - This indexes will be destroyed together (automatic?) the temp table when the connection is closed ? - When I insert a lot of new rows, need to run analyze on this temporary table ? Thanks in Advance. -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Optimizing queries that use temporary tables @ 2008-01-22 20:34 Scott Marlowe <scott.marlowe@gmail.com> parent: Luiz K. Matsumura <luiz@planit.com.br> 0 siblings, 0 replies; 2+ messages in thread From: Scott Marlowe @ 2008-01-22 20:34 UTC (permalink / raw) To: Luiz K. Matsumura <luiz@planit.com.br>; +Cc: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-01-22 20:34 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2008-01-22 19:32 Optimizing queries that use temporary tables Luiz K. Matsumura <luiz@planit.com.br> 2008-01-22 20:34 ` Scott Marlowe <scott.marlowe@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox