From users-return-11095-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Apr 03 13:23:23 2009 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 75331 invoked from network); 3 Apr 2009 13:23:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 13:23:23 -0000 Received: (qmail 19775 invoked by uid 500); 3 Apr 2009 13:23:22 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 19736 invoked by uid 500); 3 Apr 2009 13:23:22 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 19725 invoked by uid 99); 3 Apr 2009 13:23:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 13:23:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 207.126.148.182 as permitted sender) Received: from [207.126.148.182] (HELO eu3sys201aog002.obsmtp.com) (207.126.148.182) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Apr 2009 13:23:13 +0000 Received: from source ([209.85.219.173]) by eu3sys201aob002.postini.com ([207.126.154.11]) with SMTP ID DSNKSdYNrAJkSF1TTWLnQTKoBBesvfv9v7A9@postini.com; Fri, 03 Apr 2009 13:22:53 UTC Received: by ewy21 with SMTP id 21so1004764ewy.2 for ; Fri, 03 Apr 2009 06:22:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.12.18 with SMTP id 18mr909195ebl.67.1238764972439; Fri, 03 Apr 2009 06:22:52 -0700 (PDT) In-Reply-To: <22868029.post@talk.nabble.com> References: <22865321.post@talk.nabble.com> <22868029.post@talk.nabble.com> Date: Fri, 3 Apr 2009 15:22:52 +0200 Message-ID: Subject: Re: Help with performace again From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Apr 3, 2009 at 3:07 PM, daveg0 wrote: > I am using 1.5.3 and I have the respectDocumentOrder set to false. > > I did a bit of trawling the forum, once I realised it was the NodeIterator > and I found that although respectDocumentOrder=false seemed to have no > effect, if I tagged on a default order-by clause to the end of the query I > got a LazyNodeIterator rather tha a DocumentOrdered one and this helped a > lot with speed. The fianl query went down from over 16 seconds to return > 3300 nodes to 0.8 seconds, so that seems to be the solution - ensure you > have an "order by" clause on all queries (or alternatively the > "respectDocuemntOrder="false" works) You can also force the use of the lazy iterator by setting "resultFetchSize" of the SearchIndex configuration to some value, eg. 1000. That will "break" the NodeIterator.getSize() method, but in many cases you don't need it. See also http://wiki.apache.org/jackrabbit/Search Regards, Alex -- Alexander Klimetschek alexander.klimetschek@day.com