Re: Temporary Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alvaro Herrera wrote:
Christian Paul B. Cosinas wrote:
Does Creating Temporary table in a function and NOT dropping them affects
the performance of the database?

The system will drop it automatically, so it shouldn't affect.

What _could_ be affecting you if you execute that function a lot, is
accumulated bloat in pg_class, pg_attribute, or other system catalogs.
You may want to make sure these are vacuumed often.

The answer in my experience is a very loud YES YES YES

If you use lots of temporary tables you will grow and dirty your system catalogs, so you need to be vacuuming them regularly also (pg_call, pg_attribute) Otherwise your db will slow to a crawl after a while.

Ralph


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux