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

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

From: Francois Berger <berger_at_fire.shacknet.nu>
Date: Tue, 1 Jul 2003 11:57:54 +0200
Message-ID: <Pine.LNX.4.44.0307011152300.11426-100000@fire.shacknet.nu>


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 Received on Tue Jul 01 2003 - 04:57:54 CDT

Original text of this message

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