Hi Jan,
When I run xquery count(//MSG) it shows result 511990, which is correct. However, it takes a lot of time to produce that result. I thought, that with existing indices it shall bring the result in seconds, and not in minutes (like 10 minutes)
Wow; this query should be optimized and evaluated in constant time. You should try to.. - call the "optimize" database command on the database - use count( //*:MSG ) if the database included namespace
If this doesn't help, feel free to give us the output of the optimizer (which you can trigger via -V on command line, or by checking out the InfoView in the GUI)?
xquery basex:index('MSG', 'path') xquery basex:index('//MSG', 'path')
The basex:index function is only applicable to the text, attribute and full-text index (see http://basex.org/xqfunc). The path index is only utilized internally, and at quite diffferent places (such as for the count() function, as you correctly guessed...).
Hope this helps, feel free to ask for more, Christian
What I would like to know is names of indices available what is basex:index function usable for and for what it is not can I create my own indices? Like calculating date from dateTime fileds in XML. I guess it is not supported. any further reading? Most of the description is related to full text, but this is not my case.
Jan PS: Despite of some performance problems (query lasting 25 minutes) I was able to dig out some very valuable information, which would be inefficient and probably much more error prone in any other way. http://janvlcinsky.s3.amazonaws.com/projects/Monitor/websamples/timeplot/tge... -- Jan Vlčinský Slunečnicová 338/3, 734 01 Karviná Ráj, Czech Republic tel: +420-597 602 024; mob: +420-608 979 040 skype: janvlcinsky; GoogleTalk: jan.vlcinsky@gmail.com
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk