Link to home
Start Free TrialLog in
Avatar of smahaj2
smahaj2

asked on

Split a result set into equal parts

I am trying to use multi-threading in my code for faster performance. I get a result set using a stored procedure as follows -
      OPEN p_eft_noc FOR
            SELECT
            NOTICE_OF_CHANGE_ID,
            BATCH_NUMBER,
            ITEM_SEQ_NUMBER,
            ACCOUNT_NUMBER,
            ASSOCIATION_ID,
            MEMBERSHIP_NUMBER,
            ASSOCIATION_ID,
            PROCESS_DATE
            from NOTICE_OF_CHANGE eftnoc
        where nvl(eftnoc.process_date, 'N') <> 'Y'
        order by MEMBERSHIP_NUMBER;
This result set can return any number of rows from 0 to 3000. I am using java code and once I obtain the result set, i need to divide it into 8 parts so that each part is processed separately in a thread.
Can someone help me, i need to figure out how to divide this result set...and should i do it in stored procedure itself or in java code and how. Thanks...
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sean Stuber
Sean Stuber

Do you need any further help?