Skip site navigation (1) Skip section navigation (2)

Re: How to time several queries?

From: "Matthew Nuzum" <newz(at)bearfruit(dot)org>
To: <nd02tsk(at)student(dot)hig(dot)se>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: How to time several queries?
Date: 2004-10-20 12:50:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
When I'm using psql and I want to time queries, which is what I've been
doing for a little over a day now, I do the following:

Select now(); query 1; query 2; query 3; select now();

This works fine unless you're doing selects with a lot of rows which will
cause your first timestamp to scroll off the screen.

Matthew Nuzum      + "Man was born free, and everywhere  :  he is in chains," Rousseau
+~~~~~~~~~~~~~~~~~~+ "Then you will know the truth, and 
the TRUTH will set you free," Jesus Christ (John 8:32 NIV)

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of
Sent: Monday, October 18, 2004 2:28 PM
To: pgsql-performance(at)postgresql(dot)org
Subject: [PERFORM] How to time several queries?


I posted this on the general list but think it would be more appropriate
here. Sorry.

I know it is possible to time isolated queries through the settting of the
\timing option in psql. This makes PgSQL report the time it took to
perform one operation.

I would like to know how one can get a time summary of many operations, if
it is at all possible.

Thank you.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

In response to

pgsql-performance by date

Next:From: nd02tskDate: 2004-10-20 12:54:12
Subject: Re: Which plattform do you recommend I run PostgreSQL
Previous:From: nd02tskDate: 2004-10-20 11:50:38
Subject: Re: How to time several queries?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group