Re: Performance problems with prepared statements

From: Richard Huxton <dev(at)archonet(dot)com>
To: theo(at)flame(dot)co(dot)za
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance problems with prepared statements
Date: 2007-10-12 08:26:01
Message-ID: 470F2F99.7080706@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Theo Kramer wrote:
> On Thu, 2007-10-11 at 18:28 +0000, Andrew - Supernews wrote:
>> When you do this from the application, are you passing it 3 parameters,
>> or 5? The plan is clearly taking advantage of the fact that the two
>> occurrences of $1 and $2 are known to be the same value; if your app is
>> using some interface that uses ? placeholders rather than numbered
>> parameters, then the planner will not be able to make this assumption.
>
> You may just have hit the nail on the head. I use numbered parameters
> but have $1 to $5 ... let me take a look to see if I can change this.

That'll be it.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2007-10-12 13:02:32 Re: Performance problems with prepared statements
Previous Message Theo Kramer 2007-10-12 08:05:35 Re: Performance problems with prepared statements