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

Home -> Community -> Usenet -> c.d.o.server -> Re: Why does a SELECT query needs REDO?

Re: Why does a SELECT query needs REDO?

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Sat, 11 Feb 2006 07:14:57 GMT
Message-Id: <pan.2006.02.11.07.14.57.211550@sbcglobal.net>


On Sat, 11 Feb 2006 06:35:58 +0000, Mladen Gogala wrote:

> SQL> select distinct sid from v$mystat;
>
> SID
> ----------
> 50
>
> SQL>
> 1 select n.name,s.value
> 2 from v$statname n,v$sesstat s
> 3 where n.statistic#=s.statistic# and
> 4 s.sid=50 and
> 5* name like '%redo%'
> SQL> /
I just figured out that I am a total idiot: instead of selecting just sid from v$mystat, I could have joined it with v$statname and make the "s.sid=50" condition completely unnecessary. That's what happens when someone uses his stockpile of scripts, some of which are from the times of Oracle7. The proper select should read:

select n.name,s.value
from v$statname n,v$mystat s
where n.statistic#=s.statistic# and

      n.name like '%redo%';

-- 
http://www.mgogala.com
Received on Sat Feb 11 2006 - 01:14:57 CST

Original text of this message

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