Re: [basex-talk] Performance related query.

2015-03-27 Thread Christian Grün
Hi Ankit, have you already compared the query info outoput? Best, Christian On Fri, Mar 27, 2015 at 10:35 AM, ankit kumar anky4b...@gmail.com wrote: Hi, I am getting performance issue while using my own xquery library. I have written an xquery module which contains a single function which

Re: [basex-talk] Performance related query.

2015-03-27 Thread ankit kumar
Hi, Optimized query without module import count(db:attribute(large_products, distinct-values(db:open-pre(large_products,0)/products/*[@catid]/@catid))/self::id/parent::p:category[parent::products/parent::document-node()]) optimized query with module import count(let $catRefs_4 :=

Re: [basex-talk] memory usage when writing files

2015-03-27 Thread Lars Johnsen
Hi Christian, and thanks a lot for the pointer to fetch:xml - it seems to do the trick! Now, a little recoding, and it should be working. Best, Lars 2015-03-27 10:48 GMT+01:00 Christian Grün christian.gr...@gmail.com: Hi Lars, Here is some background information for the reported behavior

[basex-talk] Performance related query.

2015-03-27 Thread ankit kumar
Hi, I am getting performance issue while using my own xquery library. I have written an xquery module which contains a single function which return all the categories belong to a set of products as given below. Also there is one constrain that i cannot pass all the category to the

[basex-talk] memory usage when writing files

2015-03-27 Thread Lars Johnsen
Hi all Here is code that gradually eats up memory, whether run in GUI or as command. All it does is creating temporary collections out of folders, and writing them to file. Is there a simple way to avoid this code to eat up memory? It runs out of memory (set at 12GB for command, 18GB in GUI)

Re: [basex-talk] memory usage when writing files

2015-03-27 Thread Christian Grün
Hi Lars, Here is some background information for the reported behavior (sorry in advance if this is known to you anyway): The functional semantics of XQuery requires that repeated calls to fn:doc and fn:collection return the same documents. This can e.g. be shown by the following query:

Re: [basex-talk] Performance related query.

2015-03-27 Thread ankit kumar
Thanks Christian, I am able to solve the issue. Thanks, Ankit On 27 March 2015 at 17:10, Christian Grün christian.gr...@gmail.com wrote: Hi Ankit, The query info output indicates that only the first query is rewritten for index access (→ db:attribute). If you always work with the same

Re: [basex-talk] Performance related query.

2015-03-27 Thread Christian Grün
Hi Ankit, The query info output indicates that only the first query is rewritten for index access (→ db:attribute). If you always work with the same database instance, the following version of your query should be evaluated faster: declare function lib:getCategory($products) { let

[basex-talk] Used memory value

2015-03-27 Thread Joseph
Hi, When I open Basex 8.3 GUI, the value of the used memory keeps growing up/changing fast, even though I do not do anything. Since this does not happen with Basex 7.9, is this due to Java? (I run Java 1.8.X) Thanks, Joseph

[basex-talk] Truncated results

2015-03-27 Thread Joseph
Hi, I have noticed that when using the update facility, for example the replace expression, results for a long file may be cut off. This however does not happen if I use the non-updating expression (copy/modify): does this make sense to you? Thanks. Joseph