Search Postgresql Archives

Re: suggestions on improving a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-02-13 at 21:44 -0500, Tom Lane wrote:
> Rajarshi Guha <rguha@xxxxxxxxxxx> 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 <rguha@xxxxxxxxxxx>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
All great ideas are controversial, or have been at one time.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux