From: Michael Fuhr <mike@fuhr.org>
To: Chun Yit(Chronos) <ivanbeh@chronos.com.my>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgresql7.4.5 running slow on plpgsql function
Date: Wed, 29 Jun 2005 06:50:22 -0600
Message-ID: <20050629125022.GA31236@winnie.fuhr.org> (raw)
In-Reply-To: <003301c57c63$2bbcfee0$a279640a@Beh>
References: <000601c577d9$e2658600$a279640a@Beh>
<20050628062620.GB18635@winnie.fuhr.org>
<003301c57c63$2bbcfee0$a279640a@Beh>
[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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mike@fuhr.org, ivanbeh@chronos.com.my
Subject: Re: Postgresql7.4.5 running slow on plpgsql function
In-Reply-To: <20050629125022.GA31236@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox