Hi all,

I just got a quick question about warm-cache. I'm using PG 9.2.

When I execute this statement soon after I start/restart the database:

explain select id from test where id = 124;


The runtime is 40ms.

Then, If I execute this statement just after the above one;

explain analyze select id from test where id = 124;


The runtime is 0.8ms.

Probably the statement is cached, right?


So, I do (To clear the cache):


   - service postgresql stop
   - echo 3 > /proc/sys/vm/drop_caches
   - service postgresql start

But, then, executing the statement again, it runs in 0.8 ms.

How can I clean the cache to get the REAL runtime for that statement?
Thanks
Patrick

Reply via email to