You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Martin Zdila <m....@mwaysolutions.com> on 2008/01/17 13:44:28 UTC

slow query execution if more specific XPath is used

Hello

I have following structure in my repository:

jcr:root
	gfr:devices
		gfr:device
			gfr:capabilityMap

There are cca 4000 gfr:device nodes. Each gfr:device has only one gfr:capabilityMap. Each gfr:capabilityMap has average 20 properties.

Here are some interesting results:

1.
((QueryImpl) query).setLimit(30);
((QueryImpl) query).setOffset(anyLimit);

1.1
executing query //gfr:capabilityMap and fetching nodes takes cca 20-80ms

1.2
executing query /jcr:root/gfr:devices/gfr:device/gfr:capabilityMap and fetching nodes takes cca 2000ms

Why does this take longer time if the only difference is more specific path? I would expect even shorter time of execution and not this.

2.
now without proprietary limit/offset

2.1
//gfr:capabilityMap
cca 150-200ms

2.2
/jcr:root/gfr:devices/gfr:device/gfr:capabilityMap
cca 14000ms!!!

Should I report it as a bug?
Thanks in advance

-- 
Martin Zdila 
CTO

M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia

tel:+421-908-363-848
mailto:m.zdila@mwaysolutions.com
http://www.mwaysolutions.com
xmpp:zdila@jabbim.sk (Jabber)
skype:m.zdila