Re: Measuring CPU time use? (Another stupid question)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jessica Blank <jb(at)twu(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Measuring CPU time use? (Another stupid question)
Date: 2002-12-18 19:35:11
Message-ID: 3E00CDEF.60601@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jessica Blank wrote:
> I wish to find a way to measure the CPU time used by any given query (or
> set of queries).
>
> I could not find any information on how to do this...
>
> Is there some secret internal table (like the V$ virtual tables in Oracle)
> that contains this info?

Well, I don't know of anything specific to CPU usage, but for monitoring your
server see Monitoring Database Activity in the manual:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/monitoring.html

Also, one of the best and most commonly used tools for optimizing individual
queries is EXPLAIN ANALYZE; see:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/sql-explain.html

HTH,

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Luc Lachance 2002-12-18 19:36:25 Re: ORDER BY random() LIMIT 1 slowness
Previous Message Alvaro Herrera 2002-12-18 19:23:55 Re: ORDER BY random() LIMIT 1 slowness