jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Help with performace again
Date Fri, 03 Apr 2009 13:22:52 GMT
On Fri, Apr 3, 2009 at 3:07 PM, daveg0 <bagel10002000@googlemail.com> 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


Alexander Klimetschek

View raw message