Re: WITHOUT OIDS - Mailing list pgsql-general

From Steve Crawford
Subject Re: WITHOUT OIDS
Date
Msg-id 20030226200147.25E8E103C2@polaris.pinpointresearch.com
Whole thread Raw
In response to WITHOUT OIDS  ("Andrew Bartley" <abartley@evolvosystems.com>)
List pgsql-general
On Tuesday 25 February 2003 4:59 pm, Andrew Bartley wrote:

> The Function slows down during the day considerably.  I suspect it is due
> the constant creation and dropping of temp tables.  If I vacuum full
> pg_attribute and pg_class it fixes the problem.  But unfortunately
> vacuuming these table every run is not practical as it takes so much time.

Try regular vacuum - that should mark unused space in those tables as
reusable so the table size should stabilize instead of growing.

> create temp table test  as select * from test2

If you are always creating the same tables then could you might (if there
aren't locking issues) be able to set up empty copies of the tables and do
something like:

truncate table scratch_test;
insert into scratch_test select * from test2;

But the bigger question is what is it that you do that is creating all these
temp tables so often? Perhaps there is a completely different better
alternative.

Cheers,
Steve

pgsql-general by date:

Previous
From: Scott Chapman
Date:
Subject: Relation "reviews" with OID 16856 no longer exists
Next
From: Peter Alberer
Date:
Subject: Re: how to recover after harddisk error