I need to retrieve quite a bit of data from our oracle DB and to do so I need to run 20+ queries. Is there any way to run more than one query at a time on the same connectio
Assuming you like to live dangerously, you can run multiple "threads" from one script using the pragma AUTONOMOUS_TRANSACTION. For example:
DECLARE
PROCEDURE foo(i IN PLS_INTEGER) AS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO qux
SELECT * FROM bar
WHERE baz = i;
COMMIT;
EXCEPTION WHEN OTHERS THEN ROLLBACK;
END;
BEGIN
foo(1);
foo(2);
foo(3);
END;