Re: Optimizer Not using the Right plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pallav Kalva <pkalva(at)livedatagroup(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizer Not using the Right plan
Date: 2007-12-04 16:32:58
Message-ID: 29382.1196785978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Pallav Kalva <pkalva(at)livedatagroup(dot)com> writes:
> why does it have different plans for different values

Because the values occur different numbers of times (or so it thinks
anyway). If the rowcount estimates are far from reality, perhaps
increasing the statistics target would help. However, since you
only showed EXPLAIN and not EXPLAIN ANALYZE output, no one can
really tell whether the optimizer did anything wrong here.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew 2007-12-04 17:03:13 Re: RAID arrays and performance
Previous Message Mark Mielke 2007-12-04 16:32:14 Re: RAID arrays and performance