Re: [basex-talk] Same XQuery faster 2nd+ time

2015-08-21 Thread Philipp Steiner

Hi Christian,

thank you, good to know, that's exactly the answer i was looking for. I 
will change my benchmarks accordingly...


All the best,
Philipp

On 18.08.2015 17:43, Christian Grün wrote:

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] Same XQuery faster 2nd+ time

2015-08-18 Thread Christian Grün
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
>
>
>


[basex-talk] Same XQuery faster 2nd+ time

2015-08-18 Thread Philipp Steiner

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