Thread: postgresql query runtime
Hi
I want to know how can i measure runtime query in postgresql if i use command line psql?
not explain rutime for the query such as the runtime which appear in pgadmin ?
such as Total query runtime: 203 ms.
2011/10/11 Radhya sahal <rad_cs_2006@yahoo.com>: > Hi > I want to know how can i measure runtime query in postgresql if i use > command line psql? > not explain rutime for the query such as the runtime which appear in pgadmin > ? > such as Total query runtime: 203 ms. > Hello use \timing \? is your friend :) Regards Pavel Stehule
On 11 October 2011 21:08, Radhya sahal <rad_cs_2006@yahoo.com> wrote:
HiI want to know how can i measure runtime query in postgresql if i use command line psql?not explain rutime for the query such as the runtime which appear in pgadmin ?such as Total query runtime: 203 ms.
run this in psql:
\t
regards
Szymon
On 11 October 2011 21:13, Szymon Guz <mabewlun@gmail.com> wrote:
On 11 October 2011 21:08, Radhya sahal <rad_cs_2006@yahoo.com> wrote:HiI want to know how can i measure runtime query in postgresql if i use command line psql?not explain rutime for the query such as the runtime which appear in pgadmin ?such as Total query runtime: 203 ms.run this in psql:\tregardsSzymon
yes... \timing of course... I think I shouldn't send emails when I've got a fever :)
- Szymon
Radhya sahal <rad_cs_2006@yahoo.com> wrote: > I want to know how can i measure runtime query in postgresql if i > use command line psql? \timing on -Kevin
thank's Kevin
how i can read query runtime if i want to run query from java ?
regards,,,
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-performance group <pgsql-performance@postgresql.org>; Radhya sahal <rad_cs_2006@yahoo.com>
Sent: Tuesday, October 11, 2011 12:15 PM
Subject: Re: [PERFORM] postgresql query runtime
Radhya sahal <rad_cs_2006@yahoo.com> wrote:
> I want to know how can i measure runtime query in postgresql if i
> use command line psql?
\timing on
-Kevin
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Radhya sahal <rad_cs_2006@yahoo.com> wrote: > how i can read query runtime if i want to run query from java ? Personally, I capture System.currentTimeInMillis() before and after the query, and subtract. In our framework, we have a monitor class to encapsulate that. -Kevin