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

From: Jessica Blank <jb(at)twu(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Measuring CPU time use? (Another stupid question)
Date: 2002-12-18 20:30:22
Message-ID: Pine.LNX.4.44.0212181329140.392-100000@ensim.rackshack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanky thanky. That might work.

Still, I'd rather just have a way I could get a plain old figure.

E.g.:

DELETE FROM V$CPUUSE;
(DO THE QUERIES IN QUESTION HERE)
SELECT NANOSECONDS_USED FROM V$CPUUSE;

On Wed, 18 Dec 2002, Joe Conway wrote:

> 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
>

--
J e s s i c a L e a h B l a n k

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jessica Blank 2002-12-18 20:56:18 Re: Measuring CPU time use? (Another stupid question)
Previous Message Jean-Luc Lachance 2002-12-18 20:22:06 Re: ORDER BY random() LIMIT 1 slowness