Clearing Cache

22 views
Skip to first unread message

Mike Goodwin

unread,
Apr 14, 2013, 10:52:30 PM4/14/13
to h2-da...@googlegroups.com
Hi,

Is it possible to clear the query cache? For the purposes of comparing
query performance.

Even restarting the database does not seem to work, so they must be
getting cached to disk,

thanks,

Mike

Noel Grandin

unread,
Apr 15, 2013, 3:01:24 AM4/15/13
to h2-da...@googlegroups.com
We don't store our query cache to disk.

But the operating system will be caching disk contents itself, which
will make a large difference.

You could try clearing the operating system disk cache, but you'd have
to have to google around to figure it out for your OS.

Steve McLeod

unread,
Apr 15, 2013, 6:54:42 AM4/15/13
to h2-da...@googlegroups.com, mike.g...@cantab.net
In OS X, open up the Terminal, type the command "purge" at the command line, and then press Enter. This will clear the memory cache to help when dealing with this situation.

Regards,

Steve 
---------------------------------------------------
Steve McLeod
Founder, Poker Copilot

Mike Goodwin

unread,
Apr 15, 2013, 8:05:41 AM4/15/13
to h2-da...@googlegroups.com
Ok. It must be something like that then.

(Although my experiences usually that query times are very stable and
repeatable. Often 20% slower or so on the first run and then they
settle down. In this case I was experiencing a dramatic speed up from
about 10s to just 100ms.)

- mike

Mike Goodwin

unread,
Apr 15, 2013, 8:18:17 AM4/15/13
to Steve McLeod, h2-da...@googlegroups.com
I am on Windows 7 I'm afraid! (I'm sure it will help someone else however).

(Actually I'm trapped on windows by the greatness that is home row
computing[1] using autohotkey. Windows 7 has blue screened on me
several times - and then not booted without a reinstall (it is like
living in the 90s!), but I am still here on it...).

[1] http://duartes.org/gustavo/blog/post/home-row-computing
Reply all
Reply to author
Forward
0 new messages