Performance with temporary table

Поиск
Список
Период
Сортировка
От samantha mahindrakar
Тема Performance with temporary table
Дата
Msg-id f0c828c40804071127u512a5f89ka7866a148e3c7c21@mail.gmail.com
обсуждение исходный текст
Ответы Re: Performance with temporary table  (Richard Huxton <dev@archonet.com>)
Re: Performance with temporary table  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-performance
Hi
I have written a program that imputes(or rather corrects data) with in
my database.
Iam using a temporary table where in i put data from other partitoined
table. I then query this table to get the desired data.But the thing
is this temporary table has to be craeted for every record that i need
to correct and there are thousands of such records that need to be
corrected.
So the program necessarily creates a temporary table evrytime it has
to correct a record. However this table is dropeed after each record
is corrected.
The program works fine.....but it runs for a very long time....or it
runs for days.
Iam particularyly finding that it takes more time during this statement:

NOTICE:  theQuery in createtablevolumelaneshist CREATE TEMPORARY TABLE
predictiontable(lane_id, measurement_start, speed,volume,occupancy) AS
SELECT lane_id, measurement_start, speed,volume,occupancy
FROM samantha.lane_data_I_495 WHERE
lane_id IN (1317) AND
measurement_start BETWEEN '2007-11-18 09:25:00' AND 2007-11-19 01:39:06'

Iam not sure if i can use a cursor to replicate the functionality of
the temp table. Is the performance bad because of the creation and
deletion of the temp table?


Thanks
Samantha

В списке pgsql-performance по дате отправления:

Предыдущее
От: Albert Cervera Areny
Дата:
Сообщение: Re: performance using table partitions in Postgres 8.2.6
Следующее
От: Mark Stosberg
Дата:
Сообщение: what worked: performance improvements for geo-spatial searching on FreeBSD