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

From Rosser Schwarz
Subject Re: [PERFORM] finding a max value
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-admin
On Fri, 02 Jul 2004 20:50:26 +0200, Edoardo Ceccarelli <[email protected]> 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