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!

queries to get data in batches from a huge data table

DIVIJan 3 2013 — edited Jan 3 2013
HI,

Here is my problem, i need to create some files with my own format(let say 5000 recs each) from a huge data table (May contain 5 Million records). And i want this creation to be multi threaded.
so how can i form queries efficiently to fetch records like 1..5000 and 5001..10000 and so on.

I can form some thing like select * from table where rownum<5000 and not exists ( already fetched records) . but it is not the efficient one. . please suggest me the best way of forming the queries or any alternative approach to create files.

Edited by: DIVI on Jan 3, 2013 7:39 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2013
Added on Jan 3 2013
5 comments
3,415 views