Optimizer + bind variables

From: David Kerr <dmk(at)mr-paradox(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Optimizer + bind variables
Date: 2009-11-03 17:47:29
Message-ID: 20091103174729.GA55736@mr-paradox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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 username = '?'

In oracle they are frequently different.

if it's possible for the plan to be different how can i generate an
xplan for the bind version?

Thanks!

Dave

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2009-11-03 17:54:14 Re: Problem with database performance, Debian 4gb ram ?
Previous Message Jeff Janes 2009-11-03 17:23:33 Re: Problem with database performance, Debian 4gb ram ?