Hi,

I have a query which runs very very slow, it is doing a full table scan on tab1:

select sum(col1)
from tab1
where col2 = 'x'
group by col3

There is an index on (col2, col3), the following query runs very fast:

select *
from tab1
where col2 = 'x'

I tried to change the index to (col1, col2, col3), but there is no improvement by doing that, how can I improve the performance of this query?

Thanks