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: efficienci CURSOR+INSERT vs. INSERT INTO ... SELECT

Re: efficienci CURSOR+INSERT vs. INSERT INTO ... SELECT

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Tue, 01 Jul 2003 11:09:53 -0700
Message-ID: <3F01CE71.76BE2E23@exxesolutions.com>


Francois Berger wrote:

> Hi all,
> I have a large amount of data issued from a select to insert into a table
> Currently, I am doing a loop with a cursor and an inser statement.
> Looks like:
> CURSOR my_cursor is ...;
> FOR my_record in my_cursor LOOP
> INSERT INTO ... VALUES (my_record.name, my_record.size, ...);
> END LOOP;
>
> I was wondering if something like INSERT INTO ... SELECT... was not more
> efficient:
> INSERT INTO... SELECT name, size FROM....;
>
> Any ideas ?
>
> Francois

Go to http://tahiti.oracle.com and look at FORALL.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Jul 01 2003 - 13:09:53 CDT

Original text of this message

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