Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sequential selection from DB

Former Member
0 Likes
310

Hi Experts,

I have a DB with more than 30 million records.

I would like to process the records using the packet size <p_pckt>.

My Requirement is :

I would first process the first <p_pckt> records first.

Then later on when I come to execute the report some other day i would start the fetching and processing from <p_pckt> + 1 record in the DB and so on.

Could any one suggest some efficient way of doing it.

Regards

Sandeep

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
290

a Selectus Interruptus, very interesting.

You could add a flag to the DB table (is it just one?) and create a secondary index on this flag. Then

- select records with emtpy flag and addition UP TO <p_pckt> ROWS

- process the data

- set the flag in the processed records to "X"

This assumes that there are no blocks of data that must be processed together.

Thomas

1 REPLY 1
Read only

ThomasZloch
Active Contributor
0 Likes
291

a Selectus Interruptus, very interesting.

You could add a flag to the DB table (is it just one?) and create a secondary index on this flag. Then

- select records with emtpy flag and addition UP TO <p_pckt> ROWS

- process the data

- set the flag in the processed records to "X"

This assumes that there are no blocks of data that must be processed together.

Thomas