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!

How do I rewrite the sql query

itzkashiNov 21 2019 — edited Nov 21 2019

Hi,

I have a table ORDER with no index , partition , keys defined and I am executing below sql query to retrive the CODE starts with some value for first 200 mn records . It is taking too long to run .Is there any way I can rewrite this query.

SELECT * FROM ORDER WHERE  ROWNUM <= 200000000 AND ((CODE LIKE '1234423678%' ));

Comments
Post Details
Added on Nov 21 2019
4 comments
391 views