What does \timing measure?

From: Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr>
To: pgsql-novice(at)postgresql(dot)org
Subject: What does \timing measure?
Date: 2011-04-07 19:52:28
Message-ID: 4D9E15FC.4010509@limsi.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I want to compare the time needed to execute 2 queries (which give the
same results).
Of course this depends on the server load, the network, etc.

The basic idea is to use "\timing on" under psql but what is the
returned time? The time to execute the query on the server or the time
to fetch the results?

In the first case the measurement would be more useful (no effect of the
network and the client side).

I have also a methodological question.
The idea is to measure several times the same query (let's say 50 times)
to get basic statistics.
If I repeat the same query 50 times will the server use some caching
mechanism to accelerate the query? In my case, this is not wanted
(because I want to measure the normal query time).

Thanks in advance,
Mathieu

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Kupershmidt 2011-04-08 03:04:42 Re: What does \timing measure?
Previous Message java4dev 2011-04-05 18:26:12 Re: how to call stored procedures with output parameters