temp tables versus normal tables - Mailing list pgsql-sql

From John Lister
Subject temp tables versus normal tables
Date
Msg-id 9174D34EE07949EFBC5A1474995312D9@squarepi.com
Whole thread Raw
List pgsql-sql
I've got a process that every minute or so selects some data from a number of tables. At the minute i dump this into a normal table, where i do some more processing with it before truncating the table and starting again.. I don't have any indexes on the temporary table but have thought about adding some for the processing stage.
 
My question is, would a proper temp table be any faster/better. Are they stored entirely in memory or written to disk (i don't care if the data is lost on server restart/crash)
 
I suppose i could also use a view for the initial "insert into" and bypass the table althogether but i'm guessing this would be slower as the data would need to be looked up each time the view is used for the subsequent processing steps..
 
Any thoughts
 
Thanks
 
JOHN
 
--
 
Got needs? Get Goblin'! - http://www.pricegoblin.co.uk/

pgsql-sql by date:

Previous
From: Craig Ringer
Date:
Subject: Re: = or LIKE ?
Next
From: Peter Koczan
Date:
Subject: New datestyle(s)