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: Here is the complete question: RE: FORALL BULK INSERTS (oops)

Re: Here is the complete question: RE: FORALL BULK INSERTS (oops)

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 11 Jun 2002 16:38:43 -0700
Message-ID: <ae61m302p2@drn.newsguy.com>


In article <38c100a6.0206101051.73f48b8f_at_posting.google.com>, mygoogle_at_cadvision.com says...
>
>Sent this too soon last time... too used to hitting tabs in editors...
>damned web forms! :-/ :-)
>
>Once again from a relative PL/SQL newbie,
>
>All the articles and/or examples I have seen for bulk binding use
>elements belonging to some sort of collection, or grabs a cursor in
>order to place something in a collection to be used in the forall or
>bulk collect statement. I am inserting (as part of some pro*c embedded
>pl/sql) into a table using something like the statement below. The
>question is, is it possible to 'bulk up' with something like this
>statement? If so, can someone provide an example or template or push
>in the right direction? I have looked through the newsgroup and in
>Oracle docs and can't seem to find any info that fits this situation.
>Also, will it provide any performance benefit in this situation?
>

no need to "bulk" insert with that statement. It is a single statement. One message from the client to the server, period.

bulk inserts are used by clients that "generate some rows", "insert some rows", "generate rows", "insert rows"...

no bulking up needed for this one

>Here is the example code:
>----------------------------------------------------
>
>INSERT INTO MYTABLE(
> SELECT VALUE1,VALUE2,VALUE3,ETC
> FROM TABLE_ONE
> WHERE A_BUNCH_OF_CLAUSE_THINGS_GOING_ON
>
> SELECT VALUE1,VALUE2,VALUE3,ETC
> FROM TABLE_TWO
> WHERE A_BUNCH_OF_CLAUSE_THINGS_GOING_ON
>
> UNION
>
> SELECT VALUE1,VALUE2,VALUE3,ETC
> FROM TABLE_THREE
> WHERE A_BUNCH_OF_CLAUSE_THINGS_GOING_ON)
>------------------------------------------------------
>
>Thanks for any help. Sorry about the previous, inadvertently sent,
>half composed post on this. :-)
>
>BillR in stl

--
Thomas Kyte (tkyte@oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Tue Jun 11 2002 - 18:38:43 CDT

Original text of this message

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