Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why does a SELECT query needs REDO?
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.comReceived on Sat Feb 11 2006 - 01:14:57 CST