Re: What does \timing measure? - Mailing list pgsql-novice

From Josh Kupershmidt
Subject Re: What does \timing measure?
Date
Msg-id BANLkTi=LBrmB14jd7fwiKKAti8Va89fgLA@mail.gmail.com
Whole thread Raw
In response to Re: What does \timing measure?  (Mathieu Dubois <mathieu.dubois@limsi.fr>)
Responses Re: What does \timing measure?
List pgsql-novice
On Fri, Apr 8, 2011 at 2:31 AM, Mathieu Dubois <mathieu.dubois@limsi.fr> wrote:
> Yes I'm really interested in the "cold query time".
> Is restarting PostgreSQL mandatory? What about just log out (from
> PostgreSQL), wait some time (let's say 1mn) and then relog?

Logging out from Postgres isn't going to do anything to clear its
buffercache. AFAIK the only way to wipe it is to shutdown the server
and start it back up.

> Also a quick googling shows that to clear OS cache I can run (on the
> server):
>
> sync;
> sysctrl -w vm.drop_caches=3;
>
> Is that right?

I believe that's right, if you're on Linux with a recent kernel.

Josh

pgsql-novice by date:

Previous
From: Mathieu Dubois
Date:
Subject: Re: What does \timing measure?
Next
From: Grzegorz Szpetkowski
Date:
Subject: Re: Superuser accout (PostgreSQL 9.0.4)