Hello, I wonder if there is any way at the moment to run scripts with xquery version 1 only. I can't find a way to set XQUERY3 option to false. I have some scripts that fail to run (process runs forever) with BaseX and I want to see if the version is causing this. I have set xquery version "1.0" encoding "UTF-8"; as the first line of my script, but it doesn't seem to do anything as well. Also is there any way to see where BaseX is consuming so much time/processing power? I can use a profiler but It's not easy to see what part of the script is causing this huge delay. Thanks.
Hi George,
Hello, I wonder if there is any way at the moment to run scripts with xquery version 1 only. I can't find a way to set XQUERY3 option to false. I have some scripts that fail to run (process runs forever) with BaseX and I want to see if the version is causing this.
All queries will be interpreted as XQuery 3.1. We have removed explicit support for XQuery 1.0 and XQuery 3.0, because the number of if/else checks in the code got more and more ugly.
If you are exclusively working with BaseX, I don’t understand exactly why the version is relevant for you. Could you please give us some more hints?
Also is there any way to see where BaseX is consuming so much time/processing power?
I guess that the answer largely depends on the way your XQuery code looks like. If our own XQuery code is getting more complex, we usually write functions for sub-tasks, which can then be profiled more easily (e.g. using the BaseX prof:time() function). Are you using library functions and modules in your code?
Cheers, Christian
All queries will be interpreted as XQuery 3.1. We have removed explicit support for XQuery 1.0 and XQuery 3.0, because the number of if/else checks in the code got more and more ugly.
If you are exclusively working with BaseX, I don’t understand exactly why the version is relevant for you. Could you please give us some more hints?
OK, that makes sense. I have some hundreds of scripts that run on a system using Saxon for a long time, I'm just trying to see if using BaseX will be a better / faster / using less memory approach. All of them are legacy code and they are using xquery 1.0 syntax. Some of the scripts can be up to 5000 rows, so they are complex. I currently have a complex script that executes in a medium sized data set in about 15 seconds using Saxon, but never completes with BaseX. It's also the first one I tested, so I'm confused if I'm doing something wrong. I tried GUI, Java standalone, and Client/Server architecture but it's the same for all 3. Especially when running this script in a Client/Server architecture, I'm not able to drop the database or stop the execution of the script from within the BaseX client (client freezes), and I can only kill the basex server from terminal.
I guess that the answer largely depends on the way your XQuery code looks like. If our own XQuery code is getting more complex, we usually write functions for sub-tasks, which can then be profiled more easily (e.g. using the BaseX prof:time() function). Are you using library functions and modules in your code?
This is great, I have to take a better look at the modules. Thanks
Hi George,
Some of the scripts can be up to 5000 rows, so they are complex. I currently have a complex script that executes in a medium sized data set in about 15 seconds using Saxon, but never completes with BaseX. It's also the first one I tested, so I'm confused if I'm doing something wrong.
I see! This could easily indicate that Saxon is doing some more optimizations than BaseX.
If you should manage to further isolate the weak spots, feel free to communicate them back to us.
Thanks, Christian
basex-talk@mailman.uni-konstanz.de