Dear Marcel!
Wednesday 13 February 2008 10:11:22 Marcel Reutegger написав:
> Alex Lukin wrote:
> > My test results below.
> >
> > About repository content. It is quite simple. Repository contains small
> > articles (topics) in category hierarchy. Topic itself is node with
> > properties and few subnodes. Hierarchy of categories has 3-5 levels. My
> > tests was conducted on appr. 1000 topic nodes in appr. 40 categories.
> > Categories are created by user so I can not know how much levels
> > hierarchy has.
> >
> > Queries and execution times:
> >
> > 1. "/jcr:root/myContent/en/topics//*/my:topic" - 110 seconds.
> >
> > 2. "//topics/*/my:topic" - 43 seconds
>
> performance for queries 1 and 2 should be better with the recent changes
> from JCR-1365.
>
> > 3. "//element(my:topic)" - 12 seconds.
>
> how many results are returned?
about 400 small results consisting of 2-3 nodes with text and small jpeg
picture (20-50Kbytes) in some nodes (appr. 10%).
> is the time measured executing the query or
> does it include iterating over the result set?
Yes. I iterate nodes. Iteration takes significant time too. Debugger "sits"
in ni.getHasNext() few seconds and ni.NextNode() for minutes.
Code does not involve other time-consuming operations:
QueryResult qr = q.execute();
NodeIterator ni = qr.getNodes();
int counter = 0;
while (ni.hasNext()) {
Node n = ni.nextNode();
log.debug("Found node: "+n.getName());
}
> did you set
> respectDocumentOrder to false in workspace.xml?
Yes. In every place where it could be set :)
> how much time does it take
> to execute the following query: //element(my:topic) order by @jcr:score
>
About 12 seconds. "order by" clause does not affect performance significantly.
All tests conducted on my notebook 1.8GHz Pentium M745 + 1G RAM
--
SY, Alex Lukin
RIPE NIC HDL: LEXA1-RIPE