Re: count * performance issue

From: Matthew <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: count * performance issue
Date: 2008-03-11 14:19:09
Message-ID: Pine.LNX.4.64.0803111407580.20402@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 11 Mar 2008, Tino Wildenhain wrote:
>> And certain, qualified definitions of "accurate" as well. Race condition?
>
> You mean in a three-state-logic? null, not null and something different?

True, False, and FILE_NOT_FOUND.

No, actually I was referring to a race condition. So, you find the count
of rows with IS NULL, then someone changes a row, then you find the count
of rows with IS NOT NULL. Add the two together, and there may be rows that
were counted twice, or not at all.

Matthew

--
It's one of those irregular verbs - "I have an independent mind," "You are
an eccentric," "He is round the twist."
-- Bernard Woolly, Yes Prime Minister

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Heikki Linnakangas 2008-03-11 14:31:18 Re: count * performance issue
Previous Message Heikki Linnakangas 2008-03-11 14:03:08 Re: [PERFORM] Very slow (2 tuples/second) sequentialscan after bulk insert; speed returns to ~500 tuples/second aftercommit