<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Upscaling Your Database Application Performance: The Array Interface</title> <atom:link href="http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/feed/" rel="self" type="application/rss+xml" /><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=upscaling-your-database-application-performance-the-array-interface</link> <description>Oracle Database Performance and Scalability Blog</description> <lastBuildDate>Thu, 02 Sep 2010 21:47:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Dominic Brooks</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-23</link> <dc:creator>Dominic Brooks</dc:creator> <pubDate>Fri, 02 Oct 2009 15:44:44 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-23</guid> <description>&lt;a href=&quot;#comment-10050&quot; rel=&quot;nofollow&quot;&gt;@Chris &lt;/a&gt;
In my comment above, I linked to an example done with the clumsy struct / array descriptor classes (clumsy in my non-existent java anyway).&lt;a href=&quot;http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/&quot; rel=&quot;nofollow&quot;&gt;Here&#039;s a link to that example&lt;/a&gt; - it was twice as fast as the timings for my batch size of 50.</description> <content:encoded><![CDATA[<p><a
href="#comment-10050" rel="nofollow">@Chris </a><br
/> In my comment above, I linked to an example done with the clumsy struct / array descriptor classes (clumsy in my non-existent java anyway).</p><p><a
href="http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/" rel="nofollow">Here&#8217;s a link to that example</a> &#8211; it was twice as fast as the timings for my batch size of 50.</p> ]]></content:encoded> </item> <item><title>By: Chris</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-24</link> <dc:creator>Chris</dc:creator> <pubDate>Wed, 23 Sep 2009 21:08:27 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-24</guid> <description>I&#039;ve looked at the attached Java code and this is using the JDBC batch API available with JDBC 2.0 onwards. I thought this might have been the native array interface, this is faster as it allows arrays of values to be passed to stored procedures, which can then use bulk binds. Unsurprisingly there is a good example on Ask Tom: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:712625135727. Both techniques eliminate network round trips, but the second will be a lot more cursor friendly. The obvious advantage of the JDBC 2.0 batch API is that it is portable and most ORMs (object relational mapping) tools and frameworks support this. As far as I&#039;m aware use native array interface requires hand cranked JDBC code.</description> <content:encoded><![CDATA[<p>I&#8217;ve looked at the attached Java code and this is using the JDBC batch API available with JDBC 2.0 onwards. I thought this might have been the native array interface, this is faster as it allows arrays of values to be passed to stored procedures, which can then use bulk binds. Unsurprisingly there is a good example on Ask Tom: <a
href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:712625135727" rel="nofollow">http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:712625135727</a>. Both techniques eliminate network round trips, but the second will be a lot more cursor friendly. The obvious advantage of the JDBC 2.0 batch API is that it is portable and most ORMs (object relational mapping) tools and frameworks support this. As far as I&#8217;m aware use native array interface requires hand cranked JDBC code.</p> ]]></content:encoded> </item> <item><title>By: Chris</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-25</link> <dc:creator>Chris</dc:creator> <pubDate>Mon, 24 Aug 2009 20:51:42 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-25</guid> <description>&lt;a href=&quot;#comment-1953&quot; rel=&quot;nofollow&quot;&gt;@Greg Rahn&lt;/a&gt;
I believe that the batching API available with JDBC 2.0 onwards &#039;batches&#039; DML statements by putting a BEGIN and END around them, hence submitting them to the database in an anonymous PL/SQL block. IMHO techniques to reduce network round trips, which the JDBC batching API and array interface help to achieve, should be added to the scalability and performance &quot;Holy trinity&quot; of connection management, cursor management and good schema design.</description> <content:encoded><![CDATA[<p><a
href="#comment-1953" rel="nofollow">@Greg Rahn</a><br
/> I believe that the batching API available with JDBC 2.0 onwards &#8216;batches&#8217; DML statements by putting a BEGIN and END around them, hence submitting them to the database in an anonymous PL/SQL block. IMHO techniques to reduce network round trips, which the JDBC batching API and array interface help to achieve, should be added to the scalability and performance &#8220;Holy trinity&#8221; of connection management, cursor management and good schema design.</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-22</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Thu, 03 Jul 2008 04:53:41 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-22</guid> <description>@oracle tomI am not familiar with the native JDBC 2.0 implementation method, so I would suggest that you try both and see how they compare.  Just turn sql trace on in your test app and then tkprof the trace file.</description> <content:encoded><![CDATA[<p>@oracle tom</p><p>I am not familiar with the native JDBC 2.0 implementation method, so I would suggest that you try both and see how they compare.  Just turn sql trace on in your test app and then tkprof the trace file.</p> ]]></content:encoded> </item> <item><title>By: oracle tom</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-21</link> <dc:creator>oracle tom</dc:creator> <pubDate>Mon, 30 Jun 2008 10:57:55 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-21</guid> <description>Is there a difference in performance if the JDBC 2.0 batching or the oracle implemntation is used? (in java)</description> <content:encoded><![CDATA[<p>Is there a difference in performance if the JDBC 2.0 batching or the oracle implemntation is used? (in java)</p> ]]></content:encoded> </item> <item><title>By: jan van mourik</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-19</link> <dc:creator>jan van mourik</dc:creator> <pubDate>Sat, 27 Oct 2007 19:32:15 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-19</guid> <description>Ran a few more tests, this time connecting to the database on my laptop (10g). Also, I added a table EMP2, with a FK from emp2.mgr to emp.empno. So I&#039;m using two preparedStatements. This to see if the batching would cause any problems with the FK. The rows inserted look the same otherwise, and I&#039;m inserting the same number of rows in both tables. The results:10,000 rows into both emp and emp2
batch   elapsed in sec
1       3.266 sec
10      0.563
50      0.328
100     0.297
200     0.453
1000    0.437100,000 rows
1      40.9 sec
100     3.3441,000,000 rows
1     376.532 sec
100    45
200    36.922
500    32.875
1000   29.563Big difference from my previous test, where I accessed a database on another machine over a very slow network. Nice...jan</description> <content:encoded><![CDATA[<p>Ran a few more tests, this time connecting to the database on my laptop (10g). Also, I added a table EMP2, with a FK from emp2.mgr to emp.empno. So I&#8217;m using two preparedStatements. This to see if the batching would cause any problems with the FK. The rows inserted look the same otherwise, and I&#8217;m inserting the same number of rows in both tables. The results:</p><p>10,000 rows into both emp and emp2<br
/> batch   elapsed in sec<br
/> 1       3.266 sec<br
/> 10      0.563<br
/> 50      0.328<br
/> 100     0.297<br
/> 200     0.453<br
/> 1000    0.437</p><p>100,000 rows<br
/> 1      40.9 sec<br
/> 100     3.344</p><p>1,000,000 rows<br
/> 1     376.532 sec<br
/> 100    45<br
/> 200    36.922<br
/> 500    32.875<br
/> 1000   29.563</p><p>Big difference from my previous test, where I accessed a database on another machine over a very slow network. Nice&#8230;</p><p>jan</p> ]]></content:encoded> </item> <item><title>By: jan van mourik</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-16</link> <dc:creator>jan van mourik</dc:creator> <pubDate>Fri, 26 Oct 2007 19:21:28 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-16</guid> <description>Thanks Greg. It was also part laziness on my side. Since I&#039;m not a java programmer I had some trouble getting it to work...
Btw, my results inserting 10,000 rows (emp + pk, no fk):
Batch size   Time(s)
1             652
10             65
20             32
40             16
50             14
100             7
200             3.8
400             3.47
500             2.89
1000            2.7Notice how it scales up to batch size 200!!Thanks Greg!!!jan</description> <content:encoded><![CDATA[<p>Thanks Greg. It was also part laziness on my side. Since I&#8217;m not a java programmer I had some trouble getting it to work&#8230;<br
/> Btw, my results inserting 10,000 rows (emp + pk, no fk):<br
/> Batch size   Time(s)<br
/> 1             652<br
/> 10             65<br
/> 20             32<br
/> 40             16<br
/> 50             14<br
/> 100             7<br
/> 200             3.8<br
/> 400             3.47<br
/> 500             2.89<br
/> 1000            2.7</p><p>Notice how it scales up to batch size 200!!</p><p>Thanks Greg!!!</p><p>jan</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-18</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Thu, 25 Oct 2007 18:00:52 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-18</guid> <description>I don&#039;t think I have the trace files any more but the code is there and one can easily run the test case. The &lt;a href=&quot;http://structureddata.org/wp-content/uploads/2007/04/batchinsert.java&quot; rel=&quot;nofollow&quot;&gt;batchInsert.java&lt;/a&gt;  has the sql_trace line in it.</description> <content:encoded><![CDATA[<p>I don&#8217;t think I have the trace files any more but the code is there and one can easily run the test case. The <a
href="http://structureddata.org/wp-content/uploads/2007/04/batchinsert.java" rel="nofollow">batchInsert.java</a> has the sql_trace line in it.</p> ]]></content:encoded> </item> <item><title>By: jan van mourik</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-17</link> <dc:creator>jan van mourik</dc:creator> <pubDate>Thu, 25 Oct 2007 17:35:54 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-17</guid> <description>Nice, very interesting!
I&#039;d like to see the tkprof output for a few testcases too (or Hotsos profiler if possible). Did you trace these testcases?Regards, jan</description> <content:encoded><![CDATA[<p>Nice, very interesting!<br
/> I&#8217;d like to see the tkprof output for a few testcases too (or Hotsos profiler if possible). Did you trace these testcases?</p><p>Regards, jan</p> ]]></content:encoded> </item> <item><title>By: thangadurai</title><link>http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/comment-page-1/#comment-20</link> <dc:creator>thangadurai</dc:creator> <pubDate>Wed, 26 Sep 2007 07:33:43 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/2007/04/30/upscaling-your-database-application-performance-the-array-interface/#comment-20</guid> <description>its very userful to all, who are working in both 10g And 11g databases.</description> <content:encoded><![CDATA[<p>its very userful to all, who are working in both 10g And 11g databases.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 2/17 queries in 0.007 seconds using disk

Served from: structureddata.org @ 2010-09-07 02:32:11 -->