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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Which is beter a cursor or a for loop?

RE: Which is beter a cursor or a for loop?

From: Grant Allen <grant_at_towersoft.co.uk>
Date: Mon, 24 Feb 2003 03:13:44 -0800
Message-ID: <F001.00556688.20030224031344@fatcity.com>


> -----Original Message-----
> Sent: 24 February 2003 08:39
> To: Multiple recipients of list ORACLE-L
>
>
>
> Hello,
>
> I was just asked by one of our developers which is beter to use:-
> a cursor or a for loop?
> I must admit I am not sure....

<humour on>

That's like asking "I have a Porsche. What's the fastest way to make it move ... to push it, or pull it?"

The answer would have to be neither ... drive the thing the way it's been engineered to perform.

<humour off>

If your developers don't understand the power of set-based logic in RDBMS, then now's the time to teach them.

(Yeah, OK, depending on the complexity of the 'do lots of database stuff', you might need to resort to cursors or loops. But these shouldn't be the first option!)

Just my 2¢

Ciao
Fuzzy
:-)

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Grant Allen
  INET: grant_at_towersoft.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Feb 24 2003 - 05:13:44 CST

Original text of this message

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