pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tino Wildenhain <tino@wildenhain.de>
To: Matthew <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: count * performance issue
Date: Tue, 11 Mar 2008 15:01:06 +0100
Message-ID: <47D690A2.2090509@wildenhain.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0803111355440.20402@aragorn.flymine.org>
References: <f966c2ee0803052142l6a105678jfe2da92a0d9371@mail.gmail.com>
	<47D00DB2.7040007@emolecules.com>
	<18451.1204824562@sss.pgh.pa.us>
	<200803071727.36146.josh@agliodbs.com>
	<13345.1204940295@sss.pgh.pa.us>
	<87r6eia9tz.fsf@oxford.xeocode.com>
	<12ba3bf00803101354w15b023e1o237f564a1b01105f@mail.gmail.com>
	<Pine.GSO.4.64.0803101853090.25041@westnet.com>
	<36af4bed0803101957u6078127fq78dc3384fe78de5d@mail.gmail.com>
	<20080311093537.a60e2e3d.wmoran@collaborativefusion.com>
	<Pine.LNX.4.64.0803111355440.20402@aragorn.flymine.org>

Hi,

Matthew wrote:
> 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?

You mean in a three-state-logic? null, not null and something different?

;-)

Tino



view thread (62+ messages)  latest in thread

Message-ID: <47D690A2.2090509@wildenhain.de>
Permalink:  ../47D690A2.2090509@wildenhain.de/
Also on:    postgresql.org/message-id/47D690A2.2090509@wildenhain.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tino@wildenhain.de, matthew@flymine.org
  Subject: Re: count * performance issue
  In-Reply-To: <47D690A2.2090509@wildenhain.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox