Re: Astonishing explain...! - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Astonishing explain...!
Date
Msg-id 200206250430.g5P4UwA03331@candle.pha.pa.us
Whole thread Raw
In response to Re: Astonishing explain...!  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-general
Neil Conway wrote:
> On Mon, 24 Jun 2002 08:43:16 -0700 (PDT)
> "Mike Harding" <mvh@ix.netcom.com> wrote:
> > Why is a sequential scan be done for MAX of an indexed column?  This
> > is obviously pretty painful for large tables...
>
> This is an FAQ -- check the archives for much more discussion of it.

Well, an FAQ item as of yesterday anyway.  ;-)


> In short, the workaround is to create a btree index on the column
> in question, and do:
>
> SELECT num FROM boogers ORDER BY num LIMIT 1;
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilconway@rogers.com>
> PGP Key ID: DB3C29FC
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



pgsql-general by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: SQL server application porting headache
Next
From: Suraj Peri
Date:
Subject: Re: How can i create an object in Postgres