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

Timing queries

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Postgres-General <pgsql-general(at)postgreSQL(dot)org>
Subject: Timing queries
Date: 1999-04-29 18:02:16
Message-ID: 37289EA8.1E627B76@albourne.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

	I've got a large application with hundreds of different queries. I
thought I had them all sorted out (i.e. determined the correct indices
to make them quick), but now I see that, with 5 copies of the
application running, I'm getting some serious contention on the
database. Is there some way of switching on debugging, so that I can see
the query that is executed and get an elapsed+system time for its
execution (elapsed to figure out whether it may be hanging on locks,
better still would be information on how long a query was locked out)?
>From the debugging the framework for something like this seems to exist,
and I found a section in chapter 62 of the developer's guide that says
something about timing, but couldn't figure out exactly what. 

I'm using 4.2 and a mix of perl/DBI/DBD and C++/libpq. 

Thanks,

Adriaan

pgsql-general by date

Next:From: Brett W. McCoyDate: 1999-04-29 18:04:45
Subject: Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Previous:From: José SoaresDate: 1999-04-29 15:50:28
Subject: Re: [GENERAL] LIMIT QUESTION

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