From: | Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: What does \timing measure? |
Date: | 2011-04-11 17:19:09 |
Message-ID: | 4DA3380D.4010701@limsi.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hello,
Sorry for the delay.
I spent time writing a short script shell to do this (see attachment).
This script has to be run on the server. Be aware that you can very
easily destroy your DB with it.
The query can be either in a file (specified with -i FILENAME) or from
the CLI (between ' ').
Thank you very much.
Mathieu
On 04/08/2011 03:02 PM, Josh Kupershmidt wrote:
> 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
>
Attachment | Content-Type | Size |
---|---|---|
test_query | text/plain | 956 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Leovey | 2011-04-11 18:24:13 | Re: Need SQL of create TABLE including INDEX and SEQUENCE |
Previous Message | Michael Glaesemann | 2011-04-11 16:06:34 | Re: Need SQL of create TABLE including INDEX and SEQUENCE |