Skip site navigation (1) Skip section navigation (2)

Re: index performance question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Laurette Cisneros <laurette(at)nextbus(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: index performance question
Date: 2002-09-18 20:21:44
Message-ID: 20020918202144.GA4371@wolff.to (view raw or flat)
Thread:
Lists: pgsql-admin
On Wed, Sep 18, 2002 at 13:09:07 -0700,
  Laurette Cisneros <laurette(at)nextbus(dot)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.

In response to

Responses

pgsql-admin by date

Next:From: Laurette CisnerosDate: 2002-09-18 20:59:13
Subject: Re: index performance question
Previous:From: Laurette CisnerosDate: 2002-09-18 20:09:07
Subject: index performance question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group