Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 71783 invoked from network); 31 May 2005 20:23:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2005 20:23:23 -0000 Received: (qmail 21234 invoked by uid 500); 31 May 2005 20:23:22 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 21209 invoked by uid 500); 31 May 2005 20:23:22 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 21196 invoked by uid 500); 31 May 2005 20:23:22 -0000 Delivered-To: apmail-incubator-derby-cvs@incubator.apache.org Received: (qmail 21193 invoked by uid 99); 31 May 2005 20:23:22 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 31 May 2005 13:23:18 -0700 Received: (qmail 71707 invoked by uid 65534); 31 May 2005 20:23:13 -0000 Message-ID: <20050531202313.71705.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r179270 - in /incubator/derby/site/trunk: build/site/faq.html src/documentation/content/xdocs/faq.xml Date: Tue, 31 May 2005 20:23:13 -0000 To: derby-cvs@incubator.apache.org From: jta@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jta Date: Tue May 31 13:23:12 2005 New Revision: 179270 URL: http://svn.apache.org/viewcvs?rev=3D179270&view=3Drev Log: DERBY-232: added Sunitha Kambhampati's May 31 FAQ contribution on performan= ce 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/fa= q=2Ehtml?rev=3D179270&r1=3D179269&r2=3D179270&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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? +
  • +4.5.=20 + Are there any tips to make Derby go faster? + +
  • @@ -657,6 +662,41 @@ codeline and alpha snapshots must not be=20 used for production.

    + + +

    4.5.=20 + Are there any tips to make Derby go faster? +

    +
    +^ +
    +
    +

    + Here are two performance tips for coding applications: +

    +
      + =20 +
    1. =20 + Use PreparedStatement with dynamic markers('?') instead of Statem= ent.=20 + This will be faster since the statement does not need to be=20 + recompiled every time. See +http://incubator.apache.org/derby/docs/10.0/manu= als/tuning/perf21.html#HDRSII-PERF-18705 and +http://incubator.apache.org/derby/docs/10.0/manuals/tuning/= perf34.html#IDX438. +
    2. + =20 +
    3. =20 + Avoid inserts in autocommit mode if possible.=20 + Inserts can be painfully slow in autocommit mode.=20 + The reason is that each commit involves a flush of the=20 + log to the disk for each insert statement.=20 + The commit will not return until a physical disk write has been=20 + executed.=20 + So to speed things up, run in autocommit false mode and=20 + execute a number of inserts in one transaction and then explicitly=20 + issue a commit. +
    4. + =20 +
    Modified: incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documenta= tion/content/xdocs/faq.xml?rev=3D179270&r1=3D179269&r2=3D179270&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml (ori= ginal) +++ incubator/derby/site/trunk/src/documentation/content/xdocs/faq.xml Tue = May 31 13:23:12 2005 @@ -381,5 +381,35 @@

    + + + Are there any tips to make Derby go faster? + + +

    + Here are two performance tips for coding applications: +

    +
      +
    1. =20 + Use PreparedStatement with dynamic markers('?') instead of Statem= ent.=20 + This will be faster since the statement does not need to be=20 + recompiled every time. See +http://incubator.apache.org/derby/docs/10.0/manu= als/tuning/perf21.html#HDRSII-PERF-18705 and +http://incubator.apache.org/derby/docs/10.0/manuals/tuning/= perf34.html#IDX438. +
    2. +
    3. =20 + Avoid inserts in autocommit mode if possible.=20 + Inserts can be painfully slow in autocommit mode.=20 + The reason is that each commit involves a flush of the=20 + log to the disk for each insert statement.=20 + The commit will not return until a physical disk write has been=20 + executed.=20 + So to speed things up, run in autocommit false mode and=20 + execute a number of inserts in one transaction and then explicitly=20 + issue a commit. +
    4. +
    +
    +