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

Home -> Community -> Usenet -> c.d.o.server -> Will Index be Used - ORDER BY MYFIELD DESC?

Will Index be Used - ORDER BY MYFIELD DESC?

From: Delphi Dev 2000 <delphidev2000_at_yahoo.com>
Date: 13 Dec 2001 19:46:08 -0800
Message-ID: <c4ce0460.0112131946.2581dfa4@posting.google.com>

Will the index be used in the following scenario on Oracle 8i? I have browsed through the news groups and it appears that there is no clear answer to this. I have tried to do some speed benchmarks myself. Sometimes it seems that the query takes longer while other times it is quicker; I suspect that there may be some caching going on.

In any event, can you traverse backwards on indexes that are not created with the "DESC" keyword?

Create Index MYINDEX ON MYTABLE(MYFIELD); SELECT MYFIELD FROM MYTABLE WHERE MYFIELD <= 'XXXXXX' ORDER BY MYFIELD DESC; Thanks, Mark Received on Thu Dec 13 2001 - 21:46:08 CST

Original text of this message

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