Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 42091 invoked from network); 4 Jan 2005 08:14:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jan 2005 08:14:29 -0000 Received: (qmail 60507 invoked by uid 500); 4 Jan 2005 08:11:04 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 58992 invoked by uid 500); 4 Jan 2005 08:10:20 -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 57516 invoked by uid 99); 4 Jan 2005 08:09:51 -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 nwkea-mail-2.sun.com (HELO nwkea-mail-2.sun.com) (192.18.42.14) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 04 Jan 2005 00:09:37 -0800 Received: from phys-lego-1.Norway.Sun.COM ([129.159.112.5]) by nwkea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id j0489Wpv025153 for ; Tue, 4 Jan 2005 00:09:32 -0800 (PST) Received: from atum11.Norway.Sun.COM.sun.com (atum11 [129.159.112.211]) by phys-lego-1.Norway.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,v2.3beta1412) with ESMTP id j0489UNg004826; Tue, 4 Jan 2005 09:09:31 +0100 (MET) To: "Derby Discussion" Subject: Re: Optimized Inserts References: <41DA17F6.3070406@lunarlogic.com> From: Oystein.Grovlen@sun.com (=?iso-8859-1?q?=D8ystein_Gr=F8vlen?=) Date: 04 Jan 2005 09:09:30 +0100 In-Reply-To: <41DA17F6.3070406@lunarlogic.com> Message-ID: Lines: 15 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >>>>> "WH" == Wil Hunt writes: WH> The inserts that are causing problems because I don't know ahead WH> of time if the record really is an insert or not. I need to do a WH> local read to see if the record exists, and if so, perform an WH> update instead of an insert. This local read is taking about 45% WH> of my processing time, which seems strange Why not just attempt an insert in the first place and then do an update if the insert fails? -- �ystein Gr�vlen Sun Microsystems Trondheim, Norway