Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> index_desc hint question
Hi Gurus:
I'm using Oracle 7.3.3 and Rule Base optimization as default. I can do analyze with estimate statistics once a month. I have this index and assuming that I must use this index, nothing else. For each sale_person_id there are apprx 100K rows.
index sale_index
{
pos 1: sale_person_id pos 2: sale_amount pos 3: sale_date
I want to find the top 10 sale_amount for this person for a specific
date. The fastest way I found is without using SORT rather using
INDEX_DESC.
select * from
(
select /*+ INDEX_DESC(sale_index) */ sale_amount
from
sale
where
sale_person_id = :1 and sale_date = :2
)
where rownum <= 10;
Here's the questions:
Thank you so much.
-Julian
Received on Sun Mar 25 2001 - 00:21:27 CST
![]() |
![]() |