[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

[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

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 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 database instance, the

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 $catRefs

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

2015-03-27 Thread Christian Grün
Perfect! On Fri, Mar 27, 2015 at 11:20 AM, Lars Johnsen wrote: > ... and thanks for the background on XQuery semantics! > > The tweak was quite simple. The collection() function is simply emulated in > this script, where the db: prefix is bound to a private namespace : > > declare function db:col

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

2015-03-27 Thread Lars Johnsen
... and thanks for the background on XQuery semantics! The tweak was quite simple. The collection() function is simply emulated in this script, where the db: prefix is bound to a private namespace : declare function db:collection($folder) { for $file in file:list($folder) return fetch:xml($fo

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 := distinc

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 : > Hi Lars, > > Here is some background information for the reported behavior (sorry > in advance if thi

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: doc('x.

[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) afte

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 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 return all > th

[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 getCategory()