On Tue, 2007-02-13 at 21:44 -0500, Tom Lane wrote:
> Rajarshi Guha <[EMAIL PROTECTED]> writes:
> > However the clause: 
> >     dock.target = '1YC1' and        
> >     dock.dockid = dockscore_plp.id  
> > reduces the number of rows from 4.6M to 96K.
> 
> The planner seems to be estimating about ten times that many.  Perhaps
> increasing the statistics target for dock.target would help?

My original message had a typo: I expected that it should ~ 960K, so
postgres is working as expected. 

However increasing the statistics target for dock.target did lead to an
improvement in performance. Could this be because dock.target has only 5
unique values? So though the table has ~4.6M rows, each set of  ~960K
rows for dock.dockid is associated with a single value of dock.target.

Thanks,

-------------------------------------------------------------------
Rajarshi Guha <[EMAIL PROTECTED]>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
All great ideas are controversial, or have been at one time.



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to