pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rosser Schwarz <rosser.schwarz@gmail.com>
To: Edoardo Ceccarelli <eddy@expot.it>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [PERFORM] finding a max value
Date: Wed, 7 Jul 2004 15:27:19 -0500
Message-ID: <37d451f704070713271da13629@mail.gmail.com> (raw)
In-Reply-To: <40E5AE72.1080206@expot.it>
References: <20040702075007.B448FCF4D52@www.postgresql.com>
	<20040702131258.GB25007@wolff.to>
	<40E5AE72.1080206@expot.it>

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



view thread (3+ messages)

Message-ID: <37d451f704070713271da13629@mail.gmail.com>
Permalink:  ../37d451f704070713271da13629@mail.gmail.com/
Also on:    postgresql.org/message-id/37d451f704070713271da13629@mail.gmail.com

 · 

reply

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: rosser.schwarz@gmail.com, eddy@expot.it, pgsql-admin@postgresql.org
  Subject: Re: [PERFORM] finding a max value
  In-Reply-To: <37d451f704070713271da13629@mail.gmail.com>

* 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