Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 46650 invoked from network); 14 Mar 2007 22:50:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 22:50:32 -0000 Received: (qmail 68850 invoked by uid 500); 14 Mar 2007 22:50:39 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 68825 invoked by uid 500); 14 Mar 2007 22:50:39 -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 68814 invoked by uid 99); 14 Mar 2007 22:50:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 15:50:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 15:50:27 -0700 Received: from fe-amer-06.sun.com ([192.18.108.180]) by brmea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l2EMo6Xg022656 for ; Wed, 14 Mar 2007 22:50:06 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JEX00H010K6WP00@mail-amer.sun.com> (original mail from Lance.Andersen@Sun.COM) for derby-user@db.apache.org; Wed, 14 Mar 2007 16:50:06 -0600 (MDT) Received: from [129.150.64.222] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JEX00KE50RHTY90@mail-amer.sun.com> for derby-user@db.apache.org; Wed, 14 Mar 2007 16:50:06 -0600 (MDT) Date: Wed, 14 Mar 2007 18:50:08 -0400 From: "Lance J. Andersen" Subject: Re: Large multi-record insert performance In-reply-to: <45F879F4.3010806@sbcglobal.net> Sender: Lance.Andersen@Sun.COM To: Derby Discussion Message-id: <45F87C20.60606@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=windows-1252 Content-transfer-encoding: 7BIT References: <002f01c76662$c255cea0$dd00a8c0@itsdev.infotechsoft.com> <45F8763B.1090707@sbcglobal.net> <45F8784A.4080404@sun.com> <45F879F4.3010806@sbcglobal.net> User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-Virus-Checked: Checked by ClamAV on apache.org Mike Matrigali wrote: > > > Lance J. Andersen wrote: >> >> >> Even if the backend does not provide optimization for batch >> processing, i would hope that there would be still some efficiency >> especially in a networked environment vs building the strings, >> invoking execute() 1000 times in the amount of data on the wire... >> >> > I could not tell from the question whether this was network or not. I > agree in network then limiting execution probably is best. In embedded > I am not sure - I would not be surprised if doing 1000 in batch is > slower than just doing the executes. > > In either case I really would stay away from string manipulation as much > as possible and also stay away from things that create very long SQL > statements like 1000 term values clauses. i agree completely. Let the driver do the heavy lifting :-)