Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 57663 invoked from network); 19 Mar 2010 13:56:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Mar 2010 13:56:32 -0000 Received: (qmail 51037 invoked by uid 500); 19 Mar 2010 13:56:31 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 51000 invoked by uid 500); 19 Mar 2010 13:56:31 -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 50993 invoked by uid 99); 19 Mar 2010 13:56:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 13:56:31 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bpendleton.derby@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 13:56:24 +0000 Received: by fg-out-1718.google.com with SMTP id 19so274632fgg.13 for ; Fri, 19 Mar 2010 06:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=/GskG+U+r6nt42Q92ucCRIeWsnGEGfM5F/S7udk+iSI=; b=MAtkwVtHOZYEY2N9QW3qVf5yitLZAY3qL8s6EtrOb65liP69v5eZ1KSbsarTGzeTUq uXSk7yIZL3LfZpYqi7uWRPCMl6GQF8XUUHkK09Mn0vhCo/A1CmnwSrO6jVe0lZYDpHkd 6TIUAM9YI4KvHx1HoJggLj6pJ3idejnH6Z1vU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=uuAXW9THZFMaI1Vd8Z1aQcgumZgbiqeQowCkmA3J8BaFanWpMT5JrwhTwJGs//kEBX JuqhZ1KpweCXBAZO9JmVayjbijadhwOjgGW2/iKNCypcRNnZNKelRwV26ca5cIWCs+Wc VQVuV5asJLkjauEiSoGD+ADvxwXe1eN0Un9Ok= Received: by 10.87.68.15 with SMTP id v15mr103477fgk.64.1269006963855; Fri, 19 Mar 2010 06:56:03 -0700 (PDT) Received: from [192.168.0.100] (c-67-170-231-73.hsd1.ca.comcast.net [67.170.231.73]) by mx.google.com with ESMTPS id 16sm829771fxm.11.2010.03.19.06.56.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Mar 2010 06:56:03 -0700 (PDT) Message-ID: <4BA3826D.2060203@gmail.com> Date: Fri, 19 Mar 2010 06:55:57 -0700 From: Bryan Pendleton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Query execution never ends References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > SELECT count(*) > FROM contract co > LEFT JOIN ContractSubject insured ON insured.contract_id=co.id AND > insured.id=co.insured_id In this query, how does the result (the returned count) change when you change LEFT JOIN to JOIN? It sounds like you have a large number of contract records which have no ContractSubject record which matches, and the difference between the two joins is that in the outer join, those contract records are preserved. thanks, bryan