Hi all,
I have a query somethink like this..
select col1,col2,col3,col4,col5
from my_table
where my_date between date1 and date2
and my_time between time1 and time2
and (col8='xxxx' or
col9='xxxx' or
col10='xxxx' or
col11='xxxx')
order by col4,col8
my question is,I want the query to return the result faster.The table volume is about 2 million.right now it takes about 20 seconds to the result.Will it help to create indexes on columns,if so where?I have tried combinations of creating indexes on different columns but it has not helped much.
Thanks
Rohan
I have a query somethink like this..
select col1,col2,col3,col4,col5
from my_table
where my_date between date1 and date2
and my_time between time1 and time2
and (col8='xxxx' or
col9='xxxx' or
col10='xxxx' or
col11='xxxx')
order by col4,col8
my question is,I want the query to return the result faster.The table volume is about 2 million.right now it takes about 20 seconds to the result.Will it help to create indexes on columns,if so where?I have tried combinations of creating indexes on different columns but it has not helped much.
Thanks
Rohan