Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 94491 invoked from network); 10 Jan 2005 19:18:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Jan 2005 19:18:31 -0000 Received: (qmail 67157 invoked by uid 500); 10 Jan 2005 19:18:30 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 67137 invoked by uid 500); 10 Jan 2005 19:18:30 -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 67122 invoked by uid 99); 10 Jan 2005 19:18:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ns3.lunarlogic.com (HELO web1.lunarlogic.com) (67.42.197.193) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 10 Jan 2005 11:18:27 -0800 Received: from [192.168.2.60] (ulaneo-dynip60.office [192.168.2.60] (may be forged)) (authenticated (0 bits)) by web1.lunarlogic.com (8.12.11/8.11.2) with ESMTP id j0AJIPow008142 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified NO) for ; Mon, 10 Jan 2005 11:18:25 -0800 Message-ID: <41E2D509.2060508@lunarlogic.com> Date: Mon, 10 Jan 2005 11:18:33 -0800 From: Wil Hunt User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: Optimized Inserts References: <41DA17F6.3070406@lunarlogic.com> <41DEF95E.2010505@apache.org> In-Reply-To: <41DEF95E.2010505@apache.org> Content-Type: multipart/mixed; boundary="------------030501090208050009020200" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------030501090208050009020200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jeremy Boynes wrote: > Wil Hunt wrote: > >> I have a situation where I need to essentially replicate a MySQL >> database over the network and store it in an embedded Derby instance. > > > > >> Is there an easy way around this? If not, is there a hard way? >> :) Like I said, I'm guessing that I'm missing something obvious; so >> please let me know what that is! >> > > If you have a large number of changes to apply, you might also > consider a commit interval somewhere between the "all" and "every" > model you get with autocommit off and on respectively - say > programmatically committing every 10000 changes. You applications > would of course need to be able to handle the partial merge. > > Thank you for your ideas. I used your commit interval, along with Oystein's suggestion of inserting all records first, and then only updating on failure. I've managed to turn the performance from hideous to reasonable. I'll keep your other ideas in mind for future fixes, but don't have the time to look into them as yet. Thanks again to all that provided ideas. Wil --------------030501090208050009020200 Content-Type: text/x-vcard; charset=utf-8; name="wilh.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wilh.vcf" begin:vcard fn:Wil Hunt n:Hunt;William org:Lunar Logic, Inc. adr:;;488 E. 11th;Eugene;OR;97403;USA email;internet:wilh@lunarlogic.com title:Developer tel;work:541.684.9500 x1182 tel;cell:541.912.6987 x-mozilla-html:FALSE url:http://www.lunarlogic.com version:2.1 end:vcard --------------030501090208050009020200--