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: Cursors ...

Re: Cursors ...

From: Dusan Bolek <pagesflames_at_usa.net>
Date: 6 May 2002 23:43:25 -0700
Message-ID: <1e8276d6.0205062243.528a4162@posting.google.com>


"Meinhard Schnoor-Matriciani" <Meinhard_at_NewYorker.de> wrote in message news:<1020720050.690708_at_beavis>...
> Hi togehter !
>
> I am in the need of writing a SP which generates new rows i a table. I am
> doing that using a cursor and loop through the result set. Unfortunately
> it's not allowed to use subselects in a cursor, so wrote a set of function
> which return the requested column values. Now the problem ist, that this
> technique seems to consume a lot of time ( 500msec with the functions , 20ms
> in interactive mode using subselects ). Does anybody have an advice what to
> do ?

You can do your inserts in two steps. In first step you can prepare data to be inserted in using all ways available in PL/SQL (selects,

functions ...) and after everything is OK, you can in second step use
one FOR ALL ... statement and insert your data via BULK BINDING, which
si damn fast.

I'm not sure if this help you, or your problem lies elsewhere, because as Sybrand already said your question hasn't gave much clues.
--
_________________________________________

Dusan Bolek, Ing.
Oracle team leader

Note: pagesflames_at_usa.net has been cancelled due to changes (maybe we
can call it an overture to bankruptcy) on that server. I'm still using
this email to prevent SPAM. Maybe one day I will change it and have a
proper mail even for news, but right now I can be reached by this
email.
Received on Tue May 07 2002 - 01:43:25 CDT

Original text of this message

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