Re: Performance with temporary table

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Performance with temporary table
Дата
Msg-id 20080408161745.GB9062@alvh.no-ip.org
обсуждение исходный текст
Ответ на Performance with temporary table  ("samantha mahindrakar" <sam.mahindrakar@gmail.com>)
Ответы Re: Performance with temporary table
Список pgsql-performance
samantha mahindrakar escribió:

> 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.

Perhaps it would be better to truncate the temp table instead.

> 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?

Yes -- if you create/drop thousands of temp tables (or create/drop the
same temp table thousands of time), the resulting catalog bloat is
likely to hinder performance.  Perhaps autovacuum should be at work here
(and if not you can solve the issue with manual vacuums to the system
catalogs), but even then it is at best unnecessary.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Performance with temporary table
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Re: what worked: performance improvements for geo-spatial searching on FreeBSD