Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: select max

Re: select max

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 31 Jul 1999 22:44:22 +0100
Message-ID: <933458543.25078.0.nnrp-01.9e984b29@news.demon.co.uk>

  1. Strangely the 'index full scan (min/max)' doesn't seem to be an option for select max(n) from table. when the index is a descending index. The case of select max(n) from table where n <= constant is handled identically irrespective of whether the index is ascending or descending.
  2. The function can be more appropriate, but is not always usable, and still depends on the INDEX_DESC hint for best effect.

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

michael_bialik_at_my-deja.com wrote in message <7nuqr8$51n$1_at_nnrp1.deja.com>...
>Hi.
>
> Did you try using descending index in 8i?
> I think it supposed to improve such queries.
> Anyway, isn't it better to write a function that performs
> OPEN cursor ( either using descending index or INDEX_DESC hint );
> FETCH cursor ( once only ) ; and
> CLOSE cursor;
Received on Sat Jul 31 1999 - 16:44:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US