Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [GENERAL] more problems with count(*) on large table

From: Andrew Sullivan <ajs(at)crankycanuck.ca>
Date: Fri Sep 28 2007 - 13:10:32 EDT


On Fri, Sep 28, 2007 at 12:50:34PM -0400, Alvaro Herrera wrote:
>
> But he does have a WHERE condition. THe problem is, probably, that the
> condition is not selective enough so the planner chooses to do a
> seqscan.

Or else the planner has a bad idea of how selective the condition is. I've found that this sort of inconsistent selectivity on an indexed column can be because the column statistics aren't good enough. You can try ALTER TABLE...SET STATISTICS to see if it helps.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well. 
		--Dennis Ritchie

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Received on Fri Sep 28 13:14:03 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 11:57:29 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library