Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORDER BY gives good performance or INDEX hint gives good performance.

ramya_162Sep 8 2014 — edited Sep 8 2014

Hi Experts,

ORDER BY DESDC is better (or) INDESX_DESC hint is better in terms of performance?

Out of the below 2 queries which query is better?

SELECT * FROM big_table WHERE SOD_ID = 22 ORDER BY sname DESC;

CREATE INDEX sname_idx ON big_table(sname);

SELECT /*+ INDEX_DESC(bigtable sname_idx) */ * FROM big_table WHERE SOD_ID = 22;

Please help me.

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2014
Added on Sep 8 2014
7 comments
2,381 views