Re: Measuring CPU time use? (Another stupid question) - Mailing list pgsql-general

From Joe Conway
Subject Re: Measuring CPU time use? (Another stupid question)
Date
Msg-id 3E00CDEF.60601@joeconway.com
Whole thread Raw
In response to Measuring CPU time use? (Another stupid question)  (Jessica Blank <jb@twu.net>)
Responses Re: Measuring CPU time use? (Another stupid question)  (Jessica Blank <jb@twu.net>)
List 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


pgsql-general by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: ORDER BY random() LIMIT 1 slowness
Next
From: Jessica Blank
Date:
Subject: Re: Measuring CPU time use? (Another stupid question)