Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0964244B3 for ; Wed, 25 May 2011 09:46:51 +0000 (UTC) Received: (qmail 11102 invoked by uid 500); 25 May 2011 09:46:50 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 11030 invoked by uid 500); 25 May 2011 09:46:50 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 11023 invoked by uid 99); 25 May 2011 09:46:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 09:46:50 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [147.87.250.50] (HELO mr1.bfh.ch) (147.87.250.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 09:46:42 +0000 Received: from bfhsrv04.bfh.ch (bfhsrv04.bfh.ch [147.87.244.54]) by mr1.bfh.ch (8.13.8/8.13.8) with ESMTP id p4P9kJx8027354 for ; Wed, 25 May 2011 11:46:20 +0200 Received: from [192.168.2.50] (195.65.42.22) by hermes.bfh.ch (147.87.244.55) with Microsoft SMTP Server (TLS) id 8.1.436.0; Wed, 25 May 2011 11:46:20 +0200 Message-ID: <4DDCCFEB.1050208@bfh.ch> Date: Wed, 25 May 2011 11:46:19 +0200 From: =?ISO-8859-1?Q?Stefan_B=FChlmann?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Derby Discussion Subject: Re: Performance Optimization for In-Memory ReadOnly Database References: <4DDAB8B2.1070205@bfh.ch> <4DDB62E3.202@oracle.com> In-Reply-To: <4DDB62E3.202@oracle.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-PMWin-Version: 3.0.2.0, Antivirus-Engine: 3.19.1, Antivirus-Data: 4.65G X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mr1.bfh.ch X-Virus-Scanned: clamav-milter 0.97 at mr1.bfh.ch X-Virus-Status: Clean X-Old-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=disabled version=3.2.5 Hi Kristian, thank you for your e-mail. The insertion of the data takes a long time (60s - 5min). I'm using JDBCTemplates with a SingleConnectionDataSource. There is no need for multiple connections. I have created three indexed which make the querying very efficient. However creating those indexes requires just as much time as it takes to import all the CSV data without indexes. -- Stefan On 24.05.2011 09:48, Kristian Waagan wrote: > On 23.05.11 21:42, Stefan B�hlmann wrote: >> Hi together, >> >> I'm using derby for a dataprocessing application. >> SYSCS_UTIL.SYSCS_IMPORT_TABLE is used to import CSV data (around 100mb). >> The tables contain huge amount of rows (~100k) with some CLOB (max 60mb) >> columns. >> >> The table data is never altered (after the CSV import). >> >> Currently I'm using a in-memory database with pageCacheSize of 2000. >> >> Are there any other tricks to make querying the data more efficient? > Hi Stefan, > > Do I understand you correctly if I say that you find the insert > performance acceptable, but you find querying the inserted data too slow? > > If so, is the data accessed by a single connection, or with multiple > connections concurrently? > (i.e. can you run with a lower isolation level or use table locking?) > Have you created the relevant indexes? > Are you running a small set of queries repeatedly (using prepared > statements), or performing "ad-hoc" queries? > > It may be good to post some of the DDL and the queries which perform poorly. > > > Regards,