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-28 06:26:20
Message-ID: 20050628062620.GB18635@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Thu, Jun 23, 2005 at 05:56:52PM +0800, Chun Yit(Chronos) wrote:
>
> currently we have a function that use together with temp table, it calls
> search result function, everytime this function is calling, it will go
> through some filter before come out as a result.  now we have some major
> problem , the first time the function execute, it take about 13 second
> second time the function is execute, it take about 17 second, every time
> you execute the function the time taken will grow about 4 second, ?  may
> i know what going on here?  since we use function with temp table, so
> every statement that related to temp table will using EXECUTE command.

Could you post the function?  Without knowing what the code is doing
it's impossible to say what's happening.  Is the temporary table
growing on each function call?  Does the function delete records
from the table on each call, leaving a lot of dead tuples?

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

In response to

Responses

pgsql-performance by date

Next:From: John A MeinelDate: 2005-06-28 06:35:07
Subject: Re: Too slow querying a table of 15 million records
Previous:From: Tom LaneDate: 2005-06-28 06:18:44
Subject: Re: How are text columns stored?

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