Re: Re-setting V$tables

  • From: Mladen Gogala <mgogala@xxxxxxxxxxx>
  • To: Sergey Popov <sspopov@xxxxxxxxx>
  • Date: Wed, 11 Oct 2006 00:42:50 -0400

On 10/10/2006 09:43:55 PM, Sergey Popov wrote:
> Here is one that resets all of them and for all users:
> 
> shutdown force

I would have never thought of that, especially because "force" is not a
legal option for the "shutdown" command. You probably wanted to imitate humor 
by saying "abort"? Maybe "startup force"? May the force be with you.

> 
> Creating a new session will almost take care of v$sesstat for you. 

Almost? Are you sure? Are you really, really sure? Whaddya mean by "take care 
of 
v$sesstat"? Concrete shoes? V$SESSION will be sleeping with the fishes? Is there
a case in which I will get a new session and will not get a new statistics?

> It
> depend on triggers and client tool you use for this. They may do some
> after logon activity for you.

They may do some after logon activity for me? Like what? Sending my financial 
records
to the IRS? I'm very picky about my database tools, I want them to execute my 
commands, 
no less, no more. That is why I use SQL*Plus and SQLDeveloper 


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.


-- 
Mladen Gogala
http://www.mladen-gogala.com

--
//www.freelists.org/webpage/oracle-l


Other related posts: