Interesting. Did you benchmark bulk inserts as well, or just selects?

On Jul 14, 2011, at 4:08 AM, Bruce Adams wrote:

>
> Hi,
>    Having done some experimentation with DTL I am not convinced that  
> OCI is
> significantly faster than ODBC.
> The evidence seems to suggest similar performance, at least over a  
> network
> connection.  ODBC too has support
> for bulk fetch and bulk insert. My suggestion is that the machinery  
> should be
> hidden by the library.
> In DTL, for example, I can write
>
>
>      bulk_fetch_helper(view.begin(), BATCH_SIZE,
> std::ostream_iterator<MyRowData>(std::cout, "\n"));
>
> The only hint of a vector the is in the batch size parameter itself.  
> That said,
> even the out of the box performance of DTL
> when not using the bulk fetch helper is superior to SOCI (70s vs  
> 600s for my
> example query) - optimised performance
> is very similar for both libraries (~30s).
>
> Regards,
>
> Bruce.
>
>
> ----- Original Message ----
>> From: Stephen Hutton <[email protected]>
>> To: General-purpose list for SOCI users. <[email protected] 
>> >
>> Sent: Sat, July 9, 2011 5:19:52 AM
>> Subject: Re: [SOCI-users] Default performance of SOCI
>>
>>
>> On Jul 8, 2011, at 3:57 AM, Bruce Adams wrote:
>>
>>> So clearly the  bulk idiom recommended in the documentation is the
>>> best one  in
>>> soci.
>>> However its not the nicest to code compared to the more  basic  
>>> idiom:
>>>
>>> int i;
>>> statement st = (sql.prepare  <<
>>>               "select  value from numbers order by value",
>>>                into(i));
>>> st.execute();
>>> while  (st.fetch())
>>> {
>>>   cout << i <<  '\n';
>>> }
>>> Unfortunately that idiom gives performance comparible to   
>>> BATCH_SIZE=1
>>> real 586.36
>>> user 68.76
>>> sys  56.17
>>>
>>> All these results are highly repeatable.
>>> Is there  anything that can be done to achieve the performance of  
>>> the
>>> builk  idiom
>>> with the basic but prettier code
>>> (i.e. not having to use a  vector)?
>>> I am thinking perhaps, that the default should be for queries  to be
>>> buffered
>>> with unbuffered queries
>>
>> The SOCI  Oracle bulk operations support is a wrapper around the OCI
>> API. OCI  includes a high performance facility for retrieving or
>> loading data in  bulk, via arrays. SOCI simplifies the OCI interface
>> considerably, but  std::vectors (or similar) are needed in order to
>> preserve the  contiguous memory requirements of the underlying OCI   
>> API.
>>
>> Stephen
>>
>> ------------------------------------------------------------------------------
>> All  of the data generated in your IT infrastructure is seriously  
>> valuable.
>> Why?  It contains a definitive record of application performance,  
>> security
>> threats, fraudulent activity, and more. Splunk takes this data and  
>> makes
>> sense of it. IT sense. And common  sense.
>> http://p.sf.net/sfu/splunk-d2d-c2
>> _______________________________________________
>> Soci-users  mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/soci-users
>>
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Soci-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/soci-users


------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to