Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Running multiple queries in parallel within a single session

Running multiple queries in parallel within a single session

From: Paul <f1fteen_at_hotmail.com>
Date: 28 Oct 2002 06:24:29 -0800
Message-ID: <7b7286ec.0210280624.d7c16f1@posting.google.com>


Hi all,

Does anyone know a way of running multiple sql statements in
"parallel" from within a single session?

I'll expand on what I'm trying to achieve ...

I am writing an application that extracts data from an oracle database and writes the output to delimited text files on a unix file system.

I have 10 sql statements that define the content of 10 separate text files.

At the moment I am running each of the 10 queries "sequentially" within a PL/SQL block, using DBMS_SQL and UTL_FILE to allow the creation of the text files.

I was wondering if there was any way of running the 10 queries in parallel within the same session so that the text files are created simultaneously (the queries are mostly independent from each other in terms of table access).

The reason I need them to run them all in the same session is because I need read consistency across the 10 text files and therefore am using ...

"alter session set isolation_level=serializable;"

... at the start of the session to ensure this.

If I did not need read consistency, I could have split the queries up within a unix shell script and run them all in background as this is how I have achieved this in the past.

Thanks for any help/comments/advice.

P. Received on Mon Oct 28 2002 - 08:24:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US