Re: count * performance issue - Mailing list pgsql-performance

From Matthew
Subject Re: count * performance issue
Date
Msg-id Pine.LNX.4.64.0803111355440.20402@aragorn.flymine.org
Whole thread Raw
In response to Re: count * performance issue  (Bill Moran <wmoran@collaborativefusion.com>)
Responses Re: count * performance issue  (Tino Wildenhain <tino@wildenhain.de>)
List pgsql-performance
On Tue, 11 Mar 2008, Bill Moran wrote:

> In response to "Robins Tharakan" <tharakan@gmail.com>:
>> Sorry, if I am missing something here, but shouldn't something like this
>> allow us to get a (fast) accurate count ?
>>
>> SELECT COUNT(*) from table WHERE indexed_field IS NULL
>> +
>> SELECT COUNT(*) from table WHERE indexed_field IS NOT NULL
>
> For certain, qualified definitions of "fast", sure.

And certain, qualified definitions of "accurate" as well. Race condition?

Matthew

--
"Television is a medium because it is neither rare nor well done."
  -- Fred Friendly

pgsql-performance by date:

Previous
From: Dave Cramer
Date:
Subject: Re: how many index can have????
Next
From: Tino Wildenhain
Date:
Subject: Re: count * performance issue