Re: Prepared statements slow in 9.2 still (bad query plan)
| От | Tom Lane |
|---|---|
| Тема | Re: Prepared statements slow in 9.2 still (bad query plan) |
| Дата | |
| Msg-id | 12200.1351436781@sss.pgh.pa.us обсуждение |
| Ответ на | Prepared statements slow in 9.2 still (bad query plan) (Daniel Burbridge <Daniel.Burbridge@publishingtechnology.com>) |
| Ответы |
Re: Prepared statements slow in 9.2 still (bad query plan)
Re: Prepared statements slow in 9.2 still (bad query plan) |
| Список | pgsql-performance |
Daniel Burbridge <Daniel.Burbridge@publishingtechnology.com> writes:
> I have a problem with prepared statements choosing a bad query plan - I was hoping that 9.2 would have eradicated the
problem:(
9.2 will only pick the "right" plan if that plan's estimated cost is a
good bit cheaper than the "wrong" parameterized plan. In this case,
not only is there not a lot of difference, but the difference is in the
wrong direction. You need to fix that --- perhaps increasing stats
targets would help?
A more radical question is whether you have a well-chosen set of indexes
in the first place. These two seem a bit odd, and certainly not
terribly well matched to this query.
regards, tom lane
В списке pgsql-performance по дате отправления: