From: Frank Wiles <frank@wiles.org>
To: Steinar H. Gunderson <sgunderson@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Seqscan rather than Index
Date: Fri, 17 Dec 2004 17:02:29 -0600
Message-ID: <20041217170229.4de276a7.frank@wiles.org> (raw)
In-Reply-To: <20041217220907.GA10313@uio.no>
References: <20041217011853.9E8FF3CADB0@svr1.postgresql.org>
<41C2D936.3060901@archonet.com>
<87acsdkjte.fsf@stark.xeocode.com>
<20041217215627.GC8281@uio.no>
<20041217220907.GA10313@uio.no>
On Fri, 17 Dec 2004 23:09:07 +0100
"Steinar H. Gunderson" <sgunderson@bigfoot.com> wrote:
> On Fri, Dec 17, 2004 at 10:56:27PM +0100, Steinar H. Gunderson wrote:
> > I'm a bit unsure -- should counting ~3 million rows (no OIDs, PG
> > 7.4, everything in cache, 32-byte rows) take ~3500ms on an Athlon 64
> > 2800+?
>
> (I realize I was a bit unclear here. This is a completely separate
> case, not related to the original poster -- I was just wondering if
> what I'm seeing is normal or not.)
It depends more on your disk IO than the processor. Counting isn't
processor intensive, but reading through the entire table on disk
is. I've also seen a huge difference between select count(*) and
select count(1) in older versions, haven't tried it on a recent
version however.
---------------------------------
Frank Wiles <frank@wiles.org>
http://www.wiles.org
---------------------------------
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: frank@wiles.org, sgunderson@bigfoot.com
Subject: Re: Seqscan rather than Index
In-Reply-To: <20041217170229.4de276a7.frank@wiles.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