From: Michael Fuhr <mike@fuhr.org>
To: Andreas Kostyrka <andreas@kostyrka.org>
Cc: Andreas Tille <tillea@rki.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of count(*)
Date: Thu, 22 Mar 2007 08:37:13 -0600
Message-ID: <20070322143713.GA34905@winnie.fuhr.org> (raw)
In-Reply-To: <20070322122944.GD4439@andi-lap.la.revver.com>
References: <Pine.LNX.4.62.0703221149210.13747@wr-linux02>
<20070322111044.GC4439@andi-lap.la.revver.com>
<Pine.LNX.4.62.0703221239570.13747@wr-linux02>
<20070322122944.GD4439@andi-lap.la.revver.com>
On Thu, Mar 22, 2007 at 01:29:46PM +0100, Andreas Kostyrka wrote:
> * Andreas Tille <tillea@rki.de> [070322 13:24]:
> > Well, to be honest I'm not really interested in the performance of
> > count(*). I was just discussing general performance issues on the
> > phone line and when my colleague asked me about the size of the
> > database he just wonderd why this takes so long for a job his
> > MS-SQL server is much faster. So in principle I was just asking
> > a first question that is easy to ask. Perhaps I come up with
> > more difficult optimisation questions.
>
> Simple. MSSQL is optimized for this case, and uses "older"
> datastructures. PG uses a MVCC storage, which is not optimized for
> this usecase. It's quite fast for different kinds of queries.
Ask about performing concurrent selects, inserts, updates, and
deletes in SQL Server and about the implications on ACID of locking
hints such as NOLOCK. Then consider how MVCC handles concurrency
without blocking or the need for dirty reads.
--
Michael Fuhr
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: mike@fuhr.org, andreas@kostyrka.org, tillea@rki.de
Subject: Re: Performance of count(*)
In-Reply-To: <20070322143713.GA34905@winnie.fuhr.org>
* 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