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 -> Re: Multiple Cursors in PL/SQL?

Re: Multiple Cursors in PL/SQL?

From: Arnold Jones <moores_at_sequent.com>
Date: 1997/06/16
Message-ID: <33A56032.6783@sequent.com>#1/1

(Lateral thinking...) why not combine the 2 cursors into one, with the appropriate join clause, and use that in your for loop. You'll find the execution time is remarkably decreased as the database engine can perform the join more efficiently than opening a second cursor for each row in the first.
Regards,
AJ.

Michael Fanelli wrote:
>
> This is really strange! I have a small piece of PL/SQL code that has two
> explicit cursors. There are two loops: the outer loop fetches records from
> cursor 1, the inner loop fetches records from cursor two based on the
> results from cursor 1. The inner loop always does a CLOSE before exiting
> back to the outer loop.
Received on Mon Jun 16 1997 - 00:00:00 CDT

Original text of this message

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