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

Re: Performance problem on RH7.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: csegyud(at)vnet(dot)hu
Cc: "'Alvaro Herrera'" <alvherre(at)dcc(dot)uchile(dot)cl>,"'Pgsql-General(at)Postgresql(dot)Org (E-mail)'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance problem on RH7.1
Date: 2004-06-28 18:10:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud(at)vnet(dot)hu> writes:
>> I'd also suggest dropping the EXECUTE approach, as this is costing you
>> a re-plan on every call without buying much of anything.

> Do you mean I should use PERFORM instead? Or what else?
> Do you mean the "for R in execute" statements? How can I run a dynamic query
> in other way?

No, I mean the most straightforward way:

   for R in select ... where stockid = $1 and ...

This lets plpgsql cache the plan for the SELECT.

			regards, tom lane

In response to


pgsql-general by date

Next:From: ScrappyDate: 2004-06-28 18:17:39
Subject: Re: Text message
Previous:From: Tom LaneDate: 2004-06-28 18:04:59
Subject: Re: Inconsistant DOW...

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