Thank you very much for answer.
That does not solve my problem but, you gave me few ideas. Really, it would be great, if you make the possibility of getting node by index for example like here http://www.sedna.org/progguide/ProgGuidesu5.html#x9-310002.2.2.
Best wishes, Markin Alex.
2012/6/5 Christian Grün christian.gruen@gmail.com
..and a little update: you should get similar performance with updindex=true.
The main bottleneck of your query was that ~20'000 index requests were performed, most of which requested a certain index entry with a large result set. By using distinct-values(), there are still around 1'500 index requests. As the challenging index entry from the first query will only be requested once, however, the query will be much faster (in this case, the average time for an index requests will be around 0.3ms).
Hope this helps, Christian ___________________________
On Tue, Jun 5, 2012 at 6:16 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Alex,
thanks for the reproducible test files. It seems your main loop returns many duplicates. The attached query should be processed much faster (on my machine, it's processed in 500ms). I didn't work with updindex=true, though.
$ ./basex -Vc"SET ATTRINDEX true;SET UPDINDEX true;CREATE DB test2" # loop, adding documents
Assuming that all imported files are located in a local directory.. Did you try to add all documents in one go?
basex -Vc"CREATE DB test2 /path/to/back"
$ ./basex -Vc"OPEN test2;CREATE INDEX ATTRIBUTE;OPTIMIZE"
By the way, there is no need to create the attribute index, as this will be automatically done by optimize. You could as well try to run "optimize all", which will rebuild the "updindex" data structures.
Christian