From: Joe W. <jo...@gm...> - 2010-07-09 14:41:44
|
Hi Patrick, > for $i in collection("tuscreen")//xq:molecule[@id="298038"] ... > Is there a way to speed up queries? Sounds like there are some theories about getting to the bottom of the slowness, but another tack might be to adopt this approach from the Performance Tuning article, "4.9. Use fn:id to lookup xml:id attributes" - see http://exist-db.org/tuning.html#N10382. This would require either using @xml:id instead of @id, or declaring @id as type ID in a DTD - maybe more trouble than it's worth. But I have a hunch that the id() function is faster than a range index; unfortunately, I don't actually see that spelled out anywhere. Cheers, Joe |