Hello,

Pitaev, Anna wrote:

> Please, have attached a code we are use to construct an oracle sql-query.

Well, this is not a bulk insert. You are really misusing SQL for this task.
In particular, no SOCI feature is used in this code except sending a 
very complicated text to the server - any other method that attempts to 
do the same will result in the same poor performance, because the server 
has *a lot* of work to do just parsing the statement and processing the 
unions.
Are you sure that in Java you have *the same* approach and it is faster?

Please have a look at the examples here:

http://soci.sourceforge.net/doc/statements.html#bulk

(there is a typo in the first example, where ids.push_back should be 
valsIn.push_back)

Bulk insertion is performed by first filling the vector (or many 
vectors, if there are many columns) with the data and then executing the 
statement once with the whole vector as the input object.
There is absolutely no reason to put your data as text values in the 
query. This is also a bad practice for security reasons.

Please try to execute a simple bulk insert example with a test table and 
a single column, then expand it for many columns. Try the use simple 
data types if possible instead of text.
Then the performance will be much better.

Regards,

-- 
Maciej Sobczak * www.msobczak.com * www.inspirel.com

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to