Performance Not Improved with Hint [message #273289] |
Tue, 09 October 2007 19:56 |
mchittib
Messages: 87 Registered: September 2005
|
Member |
|
|
Hi,
Please help me with the below query. Its not using the index even when i use the hints.
select
a.col1,b.col2
from
orders a,
(select col1,col2
from lines
where col1='Primary'
group by col1,col2 ) b
where
a.col1=b.col1;
There is a index on a.col1,b.col1,a.col2
I have used the hints to
select /*+ index(a a_indx_1) index(b b_indx_1) */
a.col1,b.col2
from
orders a,
(select col1,col2
from lines
where col1='Primary'
group by col1,col2 ) b
where
a.col1=b.col1;
Even I tried this
select /*+ index(a a_indx_1) index(b b_indx_1) index(b b_indx_2) */
a.col1,b.col2
from
orders a,
(select col1,col2
from lines
where col1='Primary'
group by col1,col2 ) b
where
a.col1=b.col1;
Somehow the index is not used on table lines when I used a group by. Lines table is fully scanned.
I searched in google but didnt know how to solve this.
Any help would be great.
Thanks.
|
|
|
|
|
|
|