Re: max() not using index

From: "Peter Gibbs" <peter(at)emkel(dot)co(dot)za>
To: "Ralph Graulich" <maillist(at)shauny(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: max() not using index
Date: 2002-07-17 12:40:27
Message-ID: 004901c22d8f$20d81300$0b01010a@emkel.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Ralph Graulich" wrote:

> EXPLAIN SELECT MAX(dam_id) FROM dam;
> NOTICE: QUERY PLAN:
>
> Aggregate (cost=5774.65..5774.65 rows=1 width=4)
> -> Seq Scan on dam (cost=0.00..5442.92 rows=132692 width=4)

select dam_id from dam order by dam_id desc limit 1;

--
Peter Gibbs
EmKel Systems

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manfred Koizar 2002-07-17 12:42:50 Re: NULL Foreign Key
Previous Message Ralph Graulich 2002-07-17 12:40:03 Re: max() not using index