Simple DB Access
Serge Aleynikov
serge@REDACTED
Sat Aug 5 03:22:53 CEST 2006
Christian S wrote:
> On 8/5/06, Serge Aleynikov <serge@REDACTED> wrote:
>> One comment about a nice feature to have in edbc that I believe is
>> specific to OCI - array DML inserts, where bind variables can contain an
>> array of values. This saves quite a bit on network round trips when
>> inserting hundreds / thousands of records
>
> Just checking but: Is it truly the network roundtrip that take time? I
> learned that for postgres it will save time to wrap such imports with
> a transaction so one doesnt need to lock for every insert. I mean, it
> is always nice to keep apis clean.
>
This is taken from "Oracle® Call Interface Programmer's Guide Chapter 5":
"The array interface significantly reduces round trips to the database
when you are updating or inserting a large volume of data. This
reduction can lead to considerable performance gains in a busy
client/server environment. For example, consider an application that
needs to insert 10 rows into the database. Calling OCIStmtExecute() ten
times with single values results in ten network round trips to insert
all the data. The same result is possible with a single call to
OCIStmtExecute() using an input array, which involves only one network
round trip."
Serge
More information about the erlang-questions
mailing list