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: BULK COLLECT and QUERY REWRITE

Re: BULK COLLECT and QUERY REWRITE

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 28 Oct 2006 10:38:27 -0700
Message-ID: <1162057106.65064@bubbleator.drizzle.com>


chris wrote:
> I understand that Oracle 10g will rewrite your CURSOR FOR LOOP
> statements into a BULK COLLECT statement.
>
> I am contemplating no longer explicitly writing the BULK COLLECT from
> now on as it reduces the number of lines of code and greatly simplifies
> code.
>
> Can anyone see any serious flaws in this strategy?
>
> Kind Regards
> Chris

Bad idea. With bulk collect you control the LIMIT clause. 10g defaults to 100 which is a non-optimal compromise.

And how does not using BULK COLLECT simplify the code?

FETCH r INTO l_data
is simpler than
FETCH r BULK COLLECT INTO l_data LIMIT 1000;

in what way? 21 characters?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Oct 28 2006 - 12:38:27 CDT

Original text of this message

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