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: OO4O Bulk Inserts

Re: OO4O Bulk Inserts

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Tue, 18 May 2004 15:10:03 GMT
Message-ID: <fHpqc.111829$Ik.9117516@attbi_s53>

"Kevin Crosbie" <caoimhinocrosbai_at_yahoo.com> wrote in message news:aa9c47c135f95f6d967ca65fa3309edc_at_news.teranews.com...
> Hi,
>
> We are converting an existing Visual Basic system from using an ADODB
> connection to using OO4O.
>
> The reason for the conversion is to allow bulk inserting as inserts were
> becoming too often, i.e. 1000 inserts /second. Since VB is running
single
> threaded, it needs to block until the ADODB Connection returns from the
> database.
>
> I have a few questions for any of you with experience in what I am trying
to
> do:
> * Is it better to use Parameter Arrays or to pass an array to a PL/SQL
> procedure and do the insert on the database side (I'm interested in if
OO4O
> actually does the insert on the database side or if it does multiple calls
> to insert from the client side)
> * When creating a Parameter Array you must specify the array size. I can
> think of two ways of getting the array size:
> Create a ParamArray of 10,000 rows.
> Use a separate VB Array array to store my values, altering it's
> dimension by rediming until insert time, then at insert time, do an
addtable
> using the Ubound of my local array, add all the elements and then do an
> insert. After insert, remove the table.
> I would like to know what is more efficient or what way was intended,
I
> can't seem to find any examples.
>
> Let me know if anyone has any thoughts on these.
>
> Best Regards,
>
> Kevin
>
>

You are going to have to benchmark it. I've used parameters to do inserts via an insert statement and it is quite fast. Jim Received on Tue May 18 2004 - 10:10:03 CDT

Original text of this message

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