Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 36238 invoked from network); 8 Nov 2005 09:12:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Nov 2005 09:12:05 -0000 Received: (qmail 80004 invoked by uid 500); 8 Nov 2005 09:12:04 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 79993 invoked by uid 99); 8 Nov 2005 09:12:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2005 01:12:04 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 08 Nov 2005 01:11:57 -0800 Received: (qmail invoked by alias); 08 Nov 2005 09:11:41 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.81]) [212.249.34.130] by mail.gmx.net (mp014) with SMTP; 08 Nov 2005 10:11:41 +0100 X-Authenticated: #894343 Message-ID: <43706BCC.5080006@gmx.net> Date: Tue, 08 Nov 2005 10:11:40 +0100 From: Marcel Reutegger User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: How to limit the nodes amount with xpath query returned References: <620728fd0511062303o6f9ad543k@mail.gmail.com> <436F1EE6.9080603@gmx.net> <620728fd0511072252l57635f37p@mail.gmail.com> In-Reply-To: <620728fd0511072252l57635f37p@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Yao, Yao Harrison wrote: > Sure, my question is the same as you thought, and I was agreed with > your opinion that the paging of query result should be the scope of > applications , but imagine that you have to filter the more than ten > thousands nodes and pick up only 10 objects in it as your hoped every > times , so we should queried for this big result set every time and > get the small set of query returned only , and this will take the > defect of the application's performance. not necessarily, an implementation should be able to handle this scenario. the jcr api allows to lazy instanciate result nodes and a client application may skip results (NodeIterator.skip()) to avoid stepping through e.g. 10000 nodes to find the one it is interested in. I have to admit, that the current query handler implementation in jackrabbit only takes some advantage of this fact. query results are always calculated as a whole in respect to the uuids of the result node. the actual result node instances however are fetched on a lazy basis. There was another thread about a similar topic: http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/3602 so, there's still room for improvement. > So , I hope to limit the result set amount when query executed and > returned , just like MySQL's " Limit " statment. This would be a proprietary extension, and I don't know how you would specify such a keyword in XPath. regards marcel