You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by jt...@apache.org on 2005/05/31 22:23:13 UTC

svn commit: r179270 - in /incubator/derby/site/trunk: build/site/faq.html src/documentation/content/xdocs/faq.xml

Author: jta
Date: Tue May 31 13:23:12 2005
New Revision: 179270

URL: http://svn.apache.org/viewcvs?rev=179270&view=rev
Log:
DERBY-232: added Sunitha Kambhampati's May 31 FAQ contribution on performance
tips for coding applications.

Modified:
    incubator/derby/site/trunk/build/site/faq.html
    incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml

Modified: incubator/derby/site/trunk/build/site/faq.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/faq.html?rev=179270&r1=179269&r2=179270&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/faq.html (original)
+++ incubator/derby/site/trunk/build/site/faq.html Tue May 31 13:23:12 2005
@@ -272,6 +272,11 @@
       across different JVMs?
       </a>
 </li>
+<li>
+<a href="#derby_faster">4.5. 
+      Are there any tips to make Derby go faster?
+      </a>
+</li>
 </ul>
 </li>
 </ul>
@@ -657,6 +662,41 @@
       codeline and alpha snapshots must not be 
       used for production</a>.
       </p>
+</div>
+<a name="N10160"></a><a name="derby_faster"></a>
+<h4 class="faq">4.5. 
+      Are there any tips to make Derby go faster?
+      </h4>
+<div align="right">
+<a href="#derby_faster-menu">^</a>
+</div>
+<div style="margin-left: 15px">
+<p>
+      Here are two performance tips for coding applications:
+      </p>
+<ol>
+      
+<li> 
+         Use PreparedStatement with dynamic markers('?') instead of Statement. 
+         This will be faster since the statement does not need to be 
+         recompiled every time. See
+<a href="http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf21.html#HDRSII-PERF-18705">http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf21.html#HDRSII-PERF-18705</a> and
+<a href="http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf34.html#IDX438">http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf34.html#IDX438</a>.
+      </li>
+      
+<li> 
+        Avoid inserts in autocommit mode if possible. 
+        Inserts can be painfully slow in autocommit mode. 
+        The reason is that each commit involves a flush of the 
+        log to the disk for each insert statement. 
+        The commit will not return until a physical disk write has been 
+        executed. 
+        So to speed things up, run in autocommit false mode and 
+        execute a number of inserts in one transaction and then explicitly 
+        issue a commit.
+      </li>
+      
+</ol>
 </div>
 </div>
 </div>

Modified: incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml?rev=179270&r1=179269&r2=179270&view=diff
==============================================================================
--- incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml (original)
+++ incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml Tue May 31 13:23:12 2005
@@ -381,5 +381,35 @@
       </p>
       </answer>
     </faq>
+    <faq id="derby_faster">
+      <question>
+      Are there any tips to make Derby go faster?
+      </question>
+      <answer>
+      <p>
+      Here are two performance tips for coding applications:
+      </p>
+      <ol>
+      <li> 
+         Use PreparedStatement with dynamic markers('?') instead of Statement. 
+         This will be faster since the statement does not need to be 
+         recompiled every time. See
+<a href="http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf21.html#HDRSII-PERF-18705">http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf21.html#HDRSII-PERF-18705</a> and
+<a href="http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf34.html#IDX438">http://incubator.apache.org/derby/docs/10.0/manuals/tuning/perf34.html#IDX438</a>.
+      </li>
+      <li> 
+        Avoid inserts in autocommit mode if possible. 
+        Inserts can be painfully slow in autocommit mode. 
+        The reason is that each commit involves a flush of the 
+        log to the disk for each insert statement. 
+        The commit will not return until a physical disk write has been 
+        executed. 
+        So to speed things up, run in autocommit false mode and 
+        execute a number of inserts in one transaction and then explicitly 
+        issue a commit.
+      </li>
+      </ol>
+      </answer>
+    </faq>
   </faqsection>
 </faqs>