temp tables versus normal tables

Поиск
Список
Период
Сортировка
От John Lister
Тема temp tables versus normal tables
Дата
Msg-id 9174D34EE07949EFBC5A1474995312D9@squarepi.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: = or LIKE ?
Следующее
От: Peter Koczan
Дата:
Сообщение: New datestyle(s)