From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: Seqscan rather than Index
Date: Sat, 18 Dec 2004 00:55:48 +0100
Message-ID: <20041217235548.GD16149@uio.no> (raw)
In-Reply-To: <20041217170229.4de276a7.frank@wiles.org>
References: <20041217011853.9E8FF3CADB0@svr1.postgresql.org>
<41C2D936.3060901@archonet.com>
<87acsdkjte.fsf@stark.xeocode.com>
<20041217215627.GC8281@uio.no>
<20041217220907.GA10313@uio.no>
<20041217170229.4de276a7.frank@wiles.org>
On Fri, Dec 17, 2004 at 05:02:29PM -0600, Frank Wiles wrote:
> 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.
Like I said, all in cache, so no disk IO. count(*) and count(1) give me
identical results. (BTW, I don't think this is a count problem, it's a
"sequential scan" problem -- I'm just trying to find out if this is natural
or not, ie. if this is just something I have to expect in a relational
database, even with no I/O.)
/* Steinar */
--
Homepage: http://www.sesse.net/
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: sgunderson@bigfoot.com
Subject: Re: Seqscan rather than Index
In-Reply-To: <20041217235548.GD16149@uio.no>
* 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