From: Doug McNaught <doug@mcnaught.org>
To: pgsql-performance@postgresql.org
Subject: Re: Select max(foo) and select count(*) optimization
Date: Mon, 05 Jan 2004 19:29:56 -0500
Message-ID: <87oeth537f.fsf@asmodeus.mcnaught.org> (raw)
References: <BC1F1F20.71370%siracusa@mindspring.com>
<m31xqef8go.fsf@wolfe.cbbrowne.com>
<1073348666.19994.3.camel@localhost.localdomain>
Paul Tuckfield <paul@tuckfield.com> writes:
> In the case of select count(*), one optimization is to do a scan of the
> primary key, not the table itself, if the table has a primary key. In a
> certain commercial, lesser database, this is called an "index fast full
> scan". It would be important to scan the index in physical order
> (sequential physical IO) and not in key order (random physical IO)
That won't work because you still have to hit the actual tuple to
determine visibility.
-Doug
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: doug@mcnaught.org
Subject: Re: Select max(foo) and select count(*) optimization
In-Reply-To: <87oeth537f.fsf@asmodeus.mcnaught.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