Use the following SQL.
I changed <> to > and <.
This uses index.
select * from test
where trade_date = (select max(trade_date)
from test
where trade_date < sysdate and trade_date > sysdate);
|
Results 1 to 10 of 20
Thread: need help to optimize queryThreaded View
|
Click Here to Expand Forum to Full Width |