How to fetch data only from index
518838May 30 2007 — edited May 30 2007Hi,
I'm using below query which fetches arount 1,00,000 records & then perform group operations on them.
<pre>
SELECT Record_Type,Country_Product_Id,Channel_Id,SUM(Items)
FROM t_Utr
WHERE Four_Eyes_Status='A'
AND(
Booking_Date >= To_Date(v_Period_Start_Date, 'DD/MM/YYYY')
AND Booking_Date <= To_Date(v_Period_End_Date , 'DD/MM/YYYY')
)
AND Invoice_Id IS NULL
AND Link_Id=p_Link_Id
AND Billing_Indicator = 'L'
GROUP BY Record_Type, Country_Product_Id, Channel_Id
</pre>
I'm having an index on all the columns being searched and all the values being fetched.
Here I want to know if there is some procedure where we can fetch all the data from index itself, & we need not to switch again & again between table & index data.
Thanks
Deepak