On Wed, Nov 04, 2009 at 11:02:22AM +1100, Chris wrote:
- David Kerr wrote:
- >On Wed, Nov 04, 2009 at 07:43:16AM +0800, Craig Ringer wrote:
- >- David Kerr wrote:
- No.
-
- This is explained in the notes here:
-
- http://www.postgresql.org/docs/current/static/sql-prepare.html
and i've read that
David Kerr wrote:
On Wed, Nov 04, 2009 at 07:43:16AM +0800, Craig Ringer wrote:
- David Kerr wrote:
- > Does/is it possible for the PG optimizer come up with differnet plans when
- > you're using bind variables vs when you send static values?
-
- Yes, if the bind variable form causes your DB ac
Does/is it possible for the PG optimizer come up with differnet plans when
you're using bind variables vs when you send static values?
like if my query was
select * from users (add a bunch of complex joins) where username = 'dave'
vs
select * from users (add a bunch of complex joins) where user
David Kerr wrote:
> Does/is it possible for the PG optimizer come up with differnet plans when
> you're using bind variables vs when you send static values?
Yes, if the bind variable form causes your DB access driver to use a
server-side prepared statement. Pg can't use its statistics to improve
On Wed, Nov 04, 2009 at 07:43:16AM +0800, Craig Ringer wrote:
- David Kerr wrote:
- > Does/is it possible for the PG optimizer come up with differnet plans when
- > you're using bind variables vs when you send static values?
-
- Yes, if the bind variable form causes your DB access driver to use a