Re: btree index and max()

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: leonbloy(at)sinectis(dot)com(dot)ar
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: btree index and max()
Date: 2000-06-01 18:40:07
Message-ID: 3936AE07.EFBBD2F5@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

leonbloy(at)sinectis(dot)com(dot)ar wrote:
>
> => explain select max(rid) from facturas;
> NOTICE: QUERY PLAN:
>
> Aggregate (cost=21139.66 rows=342414 width=4)
> -> Seq Scan on facturas (cost=21139.66 rows=342414 width=4)
>
> I understand that the query planner cannot be so clever
> to grasp that this particular function (max or min)
> might be evaluated by just travelling the BTREE index.
> Am I correct?

I believe you are unfortunately correct. :(

Regards,
Ed Loehr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Peterson 2000-06-01 18:48:48 Re: ALTERING A TABLE
Previous Message leonbloy 2000-06-01 18:08:31 btree index and max()