Re: parameter hints to the optimizer

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: parameter hints to the optimizer
Date: 2004-07-21 21:03:44
Message-ID: 40FEDA30.2070401@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Merlin Moncure wrote:

> Another way to deal with the problem is to defer plan generation until
> the first plan execution and use the parameters from that execution.

When talking the V3 protocol, 7.5 defers plan generation for the unnamed
statement until parameters are received in the Bind message (which is
essentially the same as what you describe). There was some discussion at
the time about making it more flexible so you could apply it to arbitary
statements, but that needed a protocol change so it didn't happen.

So the guts of the work are done -- we'd just need a way to trigger the
behaviour on demand. It sounds less painful to add something to PREPARE
than to change the V3 protocol at this stage.

-O

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2004-07-21 21:07:34 Re: V3 protocol + DECLARE problems
Previous Message Simon Riggs 2004-07-21 20:53:02 Re: check point segments leakage ?