>Can you please give me a hint, who is caching (i think
>not HSQLDB?) and how i can avoid it?
The database of course caches. I doubt there is any way to turn that
off. The JDBC driver might also. It might be more amenable to
instruction. Check out the JDBC spec.
See http://mindprod.com/jgloss/jdbc.html

Signature
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
> Hello and sorry,
>
[quoted text clipped - 22 lines]
>
> TIA, Det
Roedy hit the point. This has nothing to do with your application
or the OS. If you owned a shop and every saturday, an old lady
came in wanting to buy 1,000 brooms. You'd give her the few you had
on hand, and maybe order the rest and get it to her ASAP, but after
2 weeks like this, you'd probably start every saturday with 1,000
brooms in your shop, and the transaction would go a lot quicker.
The DBMS has more data than can fit in semiconductor memory,
so it keeps whatever's been needed recently until it is forced to
clear it out to make room for something else.
If you want to normalize your test, you must ensure the DBMS is
always in the same state to start. You can do this by either
booting the DBMS fresh for the test, or pre-running your test before
officially measuring, or running some huge irrelevant query to
pre-fill the DBMS cache with data you don't need.
Joe Weinstein at BEA Systems
runic - 14 Jan 2008 14:23 GMT
Hello Joe, thanks to you and Roedy,
thank you for your answers. It couldn't be JDBC, because the
JUnit Task is "off" during between to runs, the Library with
JDBC Driver is not in use. I could leave eclipse and start
it again, running the JUnit Task (with the SELECT) again,
this tasks duration is again lesser than after starting the
machine and run the Test for first.
> Roedy hit the point. This has nothing to do with your application
> or the OS. If you owned a shop and every saturday, an old lady
Nice Example with an old Lady, buying brooms. I get it ;-)
But the answer to my first question "who caches", would be
"the Operating system". And to the second part, "where can
i disable the cache", the answer have to be: "you can't
without admin rights".
Okay, Windows have a File Cache and what I sighted was the behaviour,
listed on http://www.mckoi.com/database/maillist/msg00502.html
where the poster get the same characteristics even after reboot,
first run takes more time than following.
Unfortunately I have no Admin Rights to clear the File Cache, so
I have to think about making dummy selection between duration tests,
as you supposed as third opportunity, Joe.
Thanks again, Detlef