Re: [basex-talk] Design finding almost duplicate xml files

2015-01-02 Thread Dirk Kirsten
Hello Mansi, there is no such hooking functionality that I am aware of, neither in XQuery nor Java. Of course you could modify the BaseX core, but I would advise against it (as it will make updating to a new version quite difficult). Of course, if we see it as useful enough for a general

Re: [basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread jean-marc Mercier
errata : * declare variable $BigDb := db:open('MyBigDataBase'); 2015-01-02 21:54 GMT+01:00 jean-marc Mercier jeanmarc.merc...@gmail.com: Dirk, Hello, sorry, but a very similar behavior seems to appear also in the latest version BaseX80-20141225.174535. Here is a new code to test : declare

Re: [basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread jean-marc Mercier
Dirk, Hello, sorry, but a very similar behavior seems to appear also in the latest version BaseX80-20141225.174535. Here is a new code to test : declare variable $BigDb := AppParam:DBInputOpen($ConfigDoc); declare function local:dummy($db) {local:call(local:count_elements#1,$db)}; declare

Re: [basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread jean-marc Mercier
Hi Dirk, You are right, I was using an old 8.0 BaseX version (seems to be the one from 23/09/2014). The problem does not appear in the latest release. Thank you ! 2015-01-02 19:29 GMT+01:00 Dirk Kirsten d...@basex.org: Hello Jean-Marc, what version of BaseX did you use? I tried with the

Re: [basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread Dirk Kirsten
Hello Jean-Marc, what version of BaseX did you use? I tried with the latest snapshot and used the XMark dataset (with factor 80, which produces around the same number of elements (133653910 to be exact) you had) and got the following output with an up-to-date index: - 0.01 ms - 0.01 ms - 0.0

[basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread jean-marc Mercier
Hello (and happy new year 2015 !) I am facing some performance issues opening big databases due to an (unexpected for me) argument evaluation during function composition. Is this a normal behavior ? Cheers Here is a code description : declare variable $db := db:open(MyBigDataBase); declare

[basex-talk] Design finding almost duplicate xml files

2015-01-02 Thread Mansi Sheth
Hello, I am trying to come up with a design, which just before insert a xml file into database, will warn us, that there is almost an identical xml file (with different name and different size) already stored in the database. Almost identical would be based on few elements of xml file such as:

Re: [basex-talk] Performance issue due to evaluation during function composition ?

2015-01-02 Thread Dirk Kirsten
Hello Jean-Marc, yeah, I can reproduce that. However, I would not consider it a bug but rather a not-so-clever optimizer. The optimized query looks something like this: declare function local:dummy($db_0) { let $fun_8 := local:count_elements#1 return $fun_8($db_0) }; (prof:time(22383),