Re: [PERFORM] finding a max value - Mailing list pgsql-admin

From Rosser Schwarz
Subject Re: [PERFORM] finding a max value
Date
Msg-id 37d451f704070713271da13629@mail.gmail.com
Whole thread Raw
List pgsql-admin
On Fri, 02 Jul 2004 20:50:26 +0200, Edoardo Ceccarelli <eddy@expot.it> wrote:

> This is the query:
> select max(KA) from annuncio

> wasn't supposed to do an index scan? it takes about 1sec to get the result.

> TIP 5: Have you checked our extensive FAQ?

I believe this is a FAQ.

See: http://www.postgresql.org/docs/faqs/FAQ.html#4.8

Try "select KA from annuncio order by KA desc limit 1;"

/rls

--
:wq

pgsql-admin by date:

Previous
From: Michael Adler
Date:
Subject: Re: Problems upgrading to 7.4
Next
From: Werner Bohl
Date:
Subject: DB error recovery