Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re-setting V$tables

Re: Re-setting V$tables

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Tue, 10 Oct 2006 23:02:19 -0600
Message-Id: <6.2.3.4.2.20061010225801.056eb7e0@pop.centrexcc.com>


At 10:42 PM 10/10/2006, Mladen Gogala wrote:

>Here's the deal: I have some long running applications which I want
>to profile, without
>restarting them. The applications are long running and not
>restartable without cleanup.
>Very surprising for developers, the application actually uses
>DBMS_APPLICATION_INFO. I
>need to create a profile and say which module is the most expensive
>one. I was investigating
>several possibilities:
>1) Resetting statistics table whenever module boundaries are crossed and
> thus collect the statistics with ease and elegance.
>2) Creating a table to which I would store the values at beginning and at the
> end, forcing me to write a SQL to calculate them. Unfortunately,
> I'll have
> to do this.
>3) Writing a Perl script which would produce the desired results by
>storing the
> intermediate results in hashes. Unfortunately, this is more work then 2),
> especially if I use analytic functions like "lead" or "lag".
>
>I was trying to see whether there is a way of getting away with
>option 1) under 10.2.0.2.
>Apparently not.

You could create GTT "copies" for the v$ views you are interested in. At the beginning of a module you just copy the current content of the v$view into the corresponding GTT and at the end of the module you just select the diff of the v$view and its GTT before starting the next cycle. Hardly more work than option 1.

Regards

Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 11 2006 - 00:02:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US