Re: BULK COLLECT - Can it be implemented for a few rows .

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 02 Dec 2005 10:51:22 -0800
Message-ID: <1133549466.925188_at_jetspin.drizzle.com>


Aravindh wrote:
> This is ARAVINDH here again sorry guys I mixed up the names PROC 1 and
> PROC 2
>
> The correct message reads as
>
>
> Hi Guys,
>
>
> I have a question on the usage of BULK COLLECT .
> About an year ago I wrote a procedure (PROC 2 ) using Old oracle
> concepts of Cursors and Loops.
> Recently I changed the code and re implemented/redesigned the same
> using BULK COLLECT logic (PROC 1 ).
> I maintained the same functionality .
>
>
> There are two ways of running PROC 1 and PROC 2 (FULL RUN AND A PARTIAL
>
> RUN )
> Full run will truncate a table and repopulate all the rows of the table
>
> .
> partial run will continue from where it left in the previous run.
>
>
> FULL RUN will populate about 1 million rows while a partial run can
> populate just 5 to a max 1000 rows .
>
>
> The PROC 1 is remarkably fast when run on FULL RUN . It takes 11 min
> only to complete contrary to the PROC 2 which takes 45 minutes .
>
>
> But for the partial run the PROC 1 is very very slow . It takes 12 min
> to complete while PROC 2 takes just 20 seconds .
>
>
> I am highly confused by the functioning of the BULK COLLECT . Should it
>
> be used only when there are a lot of rows ?
> Expecting an answer to this as early as possible since i amnot able to
> proceed further .
>
>
> Regards
> KN Aravindh

Would need your version number and to see your code to comment.

But you might want to run DBMS_PROFILER and see where the time is being spent. You can find a demo of DBMS_PROFILER at www.psoug.org in Morgan's Library.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Dec 02 2005 - 19:51:22 CET

Original text of this message