Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 26089 invoked from network); 9 Sep 2004 15:58:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Sep 2004 15:58:34 -0000 Received: (qmail 66022 invoked by uid 500); 9 Sep 2004 15:57:53 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 65893 invoked by uid 500); 9 Sep 2004 15:57:51 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Derby Discussion" Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 65828 invoked by uid 99); 9 Sep 2004 15:57:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [66.163.170.82] (HELO smtp812.mail.sc5.yahoo.com) (66.163.170.82) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 09 Sep 2004 08:57:48 -0700 Received: from unknown (HELO debrunners.com) (ddebrunner@sbcglobal.net@32.97.110.142 with plain) by smtp812.mail.sc5.yahoo.com with SMTP; 9 Sep 2004 15:57:45 -0000 Message-ID: <41407D7B.10707@debrunners.com> Date: Thu, 09 Sep 2004 08:57:47 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1) Gecko/20031008 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: Derby vs. HSQL References: In-Reply-To: X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wes Johnson wrote: > Sure, it's below. Definitely not the greatest code in the world, but it > is the exact same code that I'm using to test HSQL. > > Thanks!!! > A few notes on the test code. 1) Derby's (& Cloudscape's) connection will be in auto-commit mode. This means every statement executed results in a commit. This is the JDBC standard for newly created connections. This means a flush of the transaction log will occur after every statement, depending on your disk, operating system and jvm this can take up to 20ms. This also leads to the mostly idle state when running this test, it's all waiting for the data to be synced to the physical disk. 2) Your query() method does not perform a complete query in Derby and most likely will do different amounts of work on different JDBC implementations. To perform a fair and realistic benchmark each row and each column should be fetched from the ResultSet. e.g. while (rs.next()) { rs.getInt(1); rs.getString(2); rs.getInt(3); } 3) The timed portion of the test uses 50,000 java.sql.Statement objects, Statement objects can be re-used, thus this code could use just one Statement and avoid the cost of object creation and associated garbage collection. Dan. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBQH16Iv0S4qsbfuQRAtE1AJ9KCdwOOpYorIldTaHHbCZSEc7EegCguHRw MaC6o17kFxxcypK8tq2idQQ= =HlkX -----END PGP SIGNATURE-----