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

Home -> Community -> Usenet -> c.d.o.misc -> Re: A job for two cursors?

Re: A job for two cursors?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 8 Oct 2003 04:43:41 -0700
Message-ID: <1a75df45.0310080343.4e7bf4bf@posting.google.com>


weberm_at_polaris.net (Ubiquitous) w

> How is the best way to go about doing this?

As Daniel said.

INSERT INTO Itemized
  SELECT
     stuff
  FROM Fee Detail

       Itemized
  WHERE join criteria

As a rule. Cursors as this by implication deals with data on a row-by-row level. This can have huge performance implications. Rather attempt to deal with a data set as oppose to a row. Cursor processing is difficult to scale when dealing with large volumes of data. Sure, bulk collection and pipe line tables are great PL/SQL features - but only when and where SQL cannot do the job.

Which brings me to the shortened version of the Oracle developer mantra:
- do it in SQL
- if it cannot be done in SQL, use PL/SQL

And you will be amazed at what can be done in SQL. IMO many underestimate the power and capability of just plain Oracle SQL.

--
Billy
Received on Wed Oct 08 2003 - 06:43:41 CDT

Original text of this message

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