Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 61788 invoked from network); 27 Jan 2010 19:27:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2010 19:27:58 -0000 Received: (qmail 29030 invoked by uid 500); 27 Jan 2010 19:27:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 28954 invoked by uid 500); 27 Jan 2010 19:27:58 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 28946 invoked by uid 99); 27 Jan 2010 19:27:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 19:27:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 19:27:55 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 93F87234C1F0 for ; Wed, 27 Jan 2010 11:27:34 -0800 (PST) Message-ID: <1865238302.86141264620454604.JavaMail.jira@brutus.apache.org> Date: Wed, 27 Jan 2010 19:27:34 +0000 (UTC) From: "Phil Michnik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4526) A query (bug1) or a view (bug2) from a smaller db is at least order of magnitude slower than from a larger db despite indexes; the smalller db stores a subset of data stored in the larger db; the databases were created using the same script. In-Reply-To: <1258068516.43821264533754635.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Michnik updated DERBY-4526: -------------------------------- Attachment: en_US_caseinsensitive.jar BugDemo.java 1) BugDemo.java is updated to compile 2. en_US_caseinsensitive.jar should be placed into JAVA_HOME's JRE\LIB\EXT to avoid message "Collator support not available ..." > A query (bug1) or a view (bug2) from a smaller db is at least order of magnitude slower than from a larger db despite indexes; the smalller db stores a subset of data stored in the larger db; the databases were created using the same script. > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4526 > URL: https://issues.apache.org/jira/browse/DERBY-4526 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.3.0 > Environment: see sysinfo.txt in the attachment > Reporter: Phil Michnik > Attachments: BugDemo.java, DERBY-4526 Bug Attachment.z01, DERBY-4526 Bug Attachment.z02, DERBY-4526 Bug Attachment.z03, DERBY-4526 Bug Attachment.z04, DERBY-4526 Bug Attachment.z05, DERBY-4526 Bug Attachment.z06, DERBY-4526 Bug Attachment.z07, DERBY-4526 Bug Attachment.z08, DERBY-4526 Bug Attachment.z09, DERBY-4526 Bug Attachment.z10, DERBY-4526 Bug Attachment.zip, en_US_caseinsensitive.jar > > > See BugDemo.java in the attachment. Below is a code snippet. > public BugDemo() > { > /* > * BUG 1: Although Derby uses indexes, "Hash table size = 31416" (see small_derby1.log) is the suspect in case of small_db > */ > String sql = "select f.file_id, f.name, f.is_directory from Files f, FileRestorePoints p where p.file_id=f.file_id" > +" and p.restore_point_id=1 and f.parent_folder_id=?"; > demo("Bug1", large_db, sql); //no problem, 96547 rows, 8312 milliseconds on my PC > demo("Bug1", small_db, sql); //too slow, 31416 rows, 504703 milliseconds on my PC, see small_derby1.log in the attachment > > /* > * BUG 2: Derby ignores indexes on table FileRestorePoints or rpTable when selecting from view 'rpView' of small_db on tables > * ('Files', 'FileRestorePoints', and 'rpTable') although indexes were created on each of the tables; > * > * but, in case of large_db, indexes are used properly (both databases were created from the same script) > */ > sql = "select file_id, name, length, is_directory from rpView where parent_folder_id=?"; > demo("Bug2", large_db, sql); //no problem, 96547 rows, 13718 milliseconds on my PC > demo("Bug2", small_db, sql); //too slow, 31416 rows, 204110 milliseconds on my PC, see small_derby2.log in the attachment > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.