[basex-talk] no value assigned to external variables in xq when running bxs->bxs->xq

2018-05-24 Thread Freihalter Thomas
Hello, I am using basex 9.0.1 and have this 3 files: test.xq: declare variable $test external; $test test.bxs: test=foo run.bxs: Running test.bxs is okay basex -v test.bxs BINDINGS: test=foo foo Query "test.xq" executed in 5.4 ms. basex -v run.bxs BINDINGS: test=f

Re: [basex-talk] basex trouble

2018-05-24 Thread Christian Grün
> Is it possible to add index only for "EnvelopeID" since only this field is in > where clause? If you know that it will always be the EnvelopeID field that you want to look up in the index, you can limit the index entries to this field (e.g. by setting TEXTINCLUDE to "*:EnvelopeID" as an option

Re: [basex-talk] basex trouble

2018-05-24 Thread Ветошкин Владимир
Christian, Is it possible to add index only for "EnvelopeID" since only this field is in where clause? May be it will speed up the queries.. 24.05.2018, 14:47, "Ветошкин Владимир" : > Thank you Christian for your kind words :) > > I rewrote queries as you said. > It helped and now query complet

Re: [basex-talk] Atomization

2018-05-24 Thread Christian Grün
Hi Giuseppe, Your summary is 100% correct, and surely helpful to other users. An even better option than using data() is the ENFORCEINDEX option, which was added with BaseX 9. It allows you to enforce index rewritings for the whole query, or for specific comparisons or predicates. I noticed it w

Re: [basex-talk] How to pass a document as context to QueryProcessor

2018-05-24 Thread Christian Grün
Hi William, Here’s one way to do this: Context ctx = new Context(); IO input = new IOContent(""); DBNode node = new DBNode(input); try(QueryProcessor qp = new QueryProcessor(".", ctx).context(node)) { System.out.println(qp.value()); } If your XML document is stored in a

Re: [basex-talk] basex trouble

2018-05-24 Thread Christian Grün
> I thought about "random access patterns" > But all databases are on one disk. I agree, this sounds confusing at first sight. Some more details: If the same database is opened by multiple queries, only one instance will be opened. The same data cursor is used to read data, and if the data is acce

Re: [basex-talk] Atomization

2018-05-24 Thread Giuseppe Celano
Hi Christian, Thank you for your help! To summarize (also for the benefit of other users), while it is true that in XQuery data($d/aspect-values/@sign) = "yes" and $d/aspect-values/@sign = "yes" are equivalent (because of atomization), the use of data() enables the user to prevent the use of a

Re: [basex-talk] basex trouble

2018-05-24 Thread Ветошкин Владимир
Hi, Christian! Thank you for your reply! I attached the file. I thought about "random access patterns" But all databases are on one disk. So, why two queries to different databases complete in about 5 sec? And if these queries make to one database - it takes a long time... > by setting the PARAL