[basex-talk] Create XQuery map from from Java
Hi, Is there a simple example of how to create write a Java function that returns an XQuery map anywhere? /Andy
[basex-talk] Same XQuery faster 2nd+ time
Hi, i'm a student learning XPath/XQuery/BaseX and currently experiment with XQueries on large xml files in BaseX, hope i didn't miss something obvious :) Test: 1st FLOWR query on collection: ~700ms 2nd+ identical query same collection: just ~200ms ! ? My XML-files are OPTIMIZE'd on import, but the created indexes would influence the 1st query already. This is a great speed bump, but hard on tests that assume a first query on a recently imported new collection. So i wondered how this behavior could be explained maybe turned off for testing purposes? Cheers, Philipp
Re: [basex-talk] Same XQuery faster 2nd+ time
Hi Philipp, 1st FLOWR query on collection: ~700ms 2nd+ identical query same collection: just ~200ms ! If I get it right, you ran the same query, and the second run was faster than the first run? This will mostly be the case, no matter which database you are testing. Once a query has been run, the requested data will be available in disk or main memory caches. Moreover, Java will also get faster and faster due to Just-In-Time compilation. If you want to do some serious benchmarking, you should use the client/server architecture of BaseX and start your real test after warming up your server instance (i.e., running all kinds of queries). Best, Christian My XML-files are OPTIMIZE'd on import, but the created indexes would influence the 1st query already. This is a great speed bump, but hard on tests that assume a first query on a recently imported new collection. So i wondered how this behavior could be explained maybe turned off for testing purposes? Cheers, Philipp
Re: [basex-talk] Create XQuery map from from Java
Hi Andy, Please check the attached Java class for a basic example. Feel free to ask for more details. Christian On Tue, Aug 18, 2015 at 12:58 PM, Andy Bunce bunce.a...@gmail.com wrote: Hi, Is there a simple example of how to create write a Java function that returns an XQuery map anywhere? /Andy XQueryMaps.java Description: Binary data