From: Bruno Wolff III <bruno@wolff.to>
To: Laurette Cisneros <laurette@nextbus.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: index performance question
Date: Wed, 18 Sep 2002 15:21:44 -0500
Message-ID: <20020918202144.GA4371@wolff.to> (raw)
In-Reply-To: <Pine.LNX.4.44.0209181303120.3174-100000@visor.corp.nextbus.com>
References: <Pine.LNX.4.44.0209181303120.3174-100000@visor.corp.nextbus.com>
On Wed, Sep 18, 2002 at 13:09:07 -0700,
Laurette Cisneros <laurette@nextbus.com> wrote:
>
> Aren't aggregates smart enough to use an index on the column? This takes 8
> minutes to run! I can't see that I should have to build a functional index
> (is it possible for an aggregate?) to get this to run faster?
I don't believe a functional index would work for an aggregate.
The way to do this is to use an order by clause and a limit 1 clause.
This has been discussed a lot on the lists and you should be able to find
more details in the archives.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bruno@wolff.to, laurette@nextbus.com
Subject: Re: index performance question
In-Reply-To: <20020918202144.GA4371@wolff.to>
References: <Pine.LNX.4.44.0209181303120.3174-100000@visor.corp.nextbus.com> <20020918202144.GA4371@wolff.to>
* 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