I have the following query, but it runs a bit slow as the table consist of about 30 000 records, i want to know on which columns i must create what type of index to maximize the query?
select r_curcode, r_curdesc, to_char(r_sellrate,'999990.0000') as sellrate, to_char(r_buyrate,'999990.0000') as buyrate, to_char(r_buyairmail,'999990.0000') as buyairmail, to_char(r_buysurfmail,'999990.0000') as buysurfmail from someTable order by datesubmitted, timesubmitted desc limit 3
select r_curcode, r_curdesc, to_char(r_sellrate,'999990.0000') as sellrate, to_char(r_buyrate,'999990.0000') as buyrate, to_char(r_buyairmail,'999990.0000') as buyairmail, to_char(r_buysurfmail,'999990.0000') as buysurfmail from someTable order by datesubmitted, timesubmitted desc limit 3