View Single Post

   
  #2 (permalink)  
Old 04-19-2008, 10:42 AM
Tom Lane
 
Posts: n/a
Default Re: Optimizer Not using the Right plan

Pallav Kalva <pkalva@livedatagroup.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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply With Quote