Re: What does \timing measure?

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: What does \timing measure?
Date: 2011-04-08 13:02:37
Message-ID: BANLkTi=LBrmB14jd7fwiKKAti8Va89fgLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Apr 8, 2011 at 2:31 AM, Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Grzegorz Szpetkowski 2011-04-08 13:38:07 Re: Superuser accout (PostgreSQL 9.0.4)
Previous Message Mathieu Dubois 2011-04-08 06:31:57 Re: What does \timing measure?