Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 16379 invoked by uid 99); 9 Feb 2005 11:50:12 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp005.mail.ukl.yahoo.com (HELO smtp005.mail.ukl.yahoo.com) (217.12.11.36) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 09 Feb 2005 03:50:11 -0800 Received: from unknown (HELO ?10.0.0.11?) (krisajenkins@81.178.1.69 with login) by smtp005.mail.ukl.yahoo.com with SMTP; 9 Feb 2005 11:50:08 -0000 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.6]); Wed, 09 Feb 2005 11:52:19 +0000 Message-ID: <4209F973.7020900@yahoo.co.uk> Date: Wed, 09 Feb 2005 11:52:19 +0000 From: Kris Jenkins User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ibatis-user-java@incubator.apache.org Subject: Re: What is N+1 References: <4209F665.4050104@friendvu.com> In-Reply-To: <4209F665.4050104@friendvu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked friendVU admin wrote: > What is n+1? > .V n++! :-P It's when each child object in a complex query has to be selected seperately. If 'parent' has 10 'children', you end up with 10+1 select statements being issued. See the developer's guide under 'Avoiding N+1 selects' for the full lowdown. Version 2.0.9 comes with new groupBy goodness to banish the N+1 problem. Kris -- Kris Jenkins Email: kris@jenkster.com Blog: http://cafe.jenkster.com/ Wiki: http://wiki.jenkster.com/