How to run multiple query paralelly in single session?
For Example:.
I have a query partitioned by date and code, I need to spool the data for all the code (Max 10) for a paricular report data. I mean to say i will dynamically create the query for each code and run each query at a time so that it can readuce my run time. at present if i give for all the code, it tooks around 10 hrs to spool the data. I plan to run 10 separate quries and run at a time so that it can be reduced to 1 Hr. Please advice
Query:
SELECT * FROM TABLE1
WHERE CODE IN ('1','2','3','4',......'10')
AND R_DATE = SYSDATE -30;
I want this query to be splited into 10 parts and run parallely at the same time in the same session.
SELECT * FROM TABLE1
WHERE CODE = '1'
AND R_DATE = SYSDATE -30;
SELECT * FROM TABLE1
WHERE CODE = '2'
AND R_DATE = SYSDATE -30;
.......
..........
.........
SELECT * FROM TABLE1
WHERE CODE = '10'
AND R_DATE = SYSDATE -30;