Skip site navigation (1) Skip section navigation (2)

Re: Postgresql7.4.5 running slow on plpgsql function

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Chun Yit(Chronos)" <ivanbeh(at)chronos(dot)com(dot)my>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgresql7.4.5 running slow on plpgsql function
Date: 2005-06-29 12:50:22
Message-ID: 20050629125022.GA31236@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-performance
[Please copy the mailing list on replies so others can contribute
to and learn from the discussion.]

On Wed, Jun 29, 2005 at 12:29:42PM +0800, Chun Yit(Chronos) wrote:
>
> Yes, the function will delete records from the temporary table every time 
> on each call.
> if leaving a lot of dead tuples, then how can we solve it?

If the function deletes all records from the temporary table then
you could use TRUNCATE instead of DELETE.  Otherwise you could
VACUUM the table between calls to the function (you can't run VACUUM
inside a function).

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

pgsql-performance by date

Next:From: Emil BriggsDate: 2005-06-29 15:08:28
Subject: Exclusive lock question
Previous:From: Shay KachlonDate: 2005-06-29 09:49:24
Subject: could not receive data from client: Connection timed out Error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group