Greg Stark <gsstark(at)mit(dot)edu> writes:
> However I have the complementary reaction. I find peeking at the first
> bind parameter to be scary as hell. Functions seem slightly less scary.
FWIW, we only do it in the context of unnamed parameterized queries.
As the protocol docs say, those are optimized on the assumption that
they will be executed only once. It seems entirely legitimate to me
to use the parameter values in such a case.
We might in future get braver about using sample parameter values,
but 8.0 is conservative about it.
regards, tom lane
In response to
pgsql-performance by date
|Next:||From: Greg Stark||Date: 2004-08-31 06:00:22|
|Subject: Re: Why does a simple query not use an obvious index?|
|Previous:||From: Tom Lane||Date: 2004-08-30 20:48:05|
|Subject: Re: seqscan instead of index scan |