Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 51531 invoked from network); 2 Feb 2010 09:32:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 09:32:45 -0000 Received: (qmail 48376 invoked by uid 500); 2 Feb 2010 09:32:45 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 48316 invoked by uid 500); 2 Feb 2010 09:32:45 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 48306 invoked by uid 99); 2 Feb 2010 09:32:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 09:32:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.228 as permitted sender) Received: from [209.85.218.228] (HELO mail-bw0-f228.google.com) (209.85.218.228) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 09:32:34 +0000 Received: by bwz28 with SMTP id 28so1069908bwz.36 for ; Tue, 02 Feb 2010 01:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=YPi2F0behxnaBDINgFnU4fGTtidpuPGSF+YdIaTxcpo=; b=DXV9hDv6FmuUPL/qGQvIbjbjqRkE1cCwBI1MlGycF64VfDUZqCrDmUgWok5NL7nzLG iWFmZffAzGVTB5lFwHXJ65QROJXkbl7SD0s30FUlOOva/AAzLP5q6kzXUWwnNSR7zUtO LXIJ1EBHGbPXANP6g0DN9T/MocASwnFuP9C+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=gnQFFHlHnsWMwEqZs16JFPB/9vTqU6LCwUH/EDe2yn+ZWCqZcUnt8tSQEzK86iLUgp jE9skyz8GcX5vXXe5vJCmofaDo8iC8GOBSufK9dU6/pSuMl8d4H8bWUQbeINWSt2RvDG 5185Y+xyeVdFGjxYF9XxtOFIdC/2L4nitVEdY= MIME-Version: 1.0 Received: by 10.204.32.7 with SMTP id a7mr1452058bkd.139.1265103133946; Tue, 02 Feb 2010 01:32:13 -0800 (PST) In-Reply-To: References: <27412920.post@talk.nabble.com> From: Claus Ibsen Date: Tue, 2 Feb 2010 10:31:52 +0100 Message-ID: <5380c69c1002020131t56d47120w4937bca2ceaaac2e@mail.gmail.com> Subject: Re: Performance - Camel JPA To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Feb 2, 2010 at 6:30 AM, Kevin Jackson wrote: > Hi, > [snip] > >> I have ensured that index are put in place for old table and new table. >> There is no need of second level cache in this scenario. I have used UUID to >> generate unique key when inserting new record. Yet this apps take 30 mins >> for 40,000. > > Indexes on the new table are going to hurt your insert performance. > For large data loads, have you tried: > 1 - push data into a table with no ref integrity (a load table) and no indexes > 2 - asynchronously (after all the data has been loaded into the load > table), call a stored procedure that copies the data from load to the > real table > 3 - after store proc has run, truncate the load table > > Kev > Yeah I do not think JPA fits well with ETL kinda work. http://en.wikipedia.org/wiki/Extract,_transform,_load There is a zillion other ways to load a lot of data into a database, and using an ORM will newer be very fast. Try googling a bit with your database name and ETL etc. And/or talk to DB specialists in your organization. If you need to do hand crafted SQL queries you may want to use Spring JDBC or iBatis etc. Sometimes its just easier to use Spring JDBC as its a little handy library. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus