ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10g 中使用toad的sql编辑的autotrace的问题?

10g 中使用toad的sql编辑的autotrace的问题?

原创 Linux操作系统 作者:lfree 时间:2006-04-03 00:00:00 0 删除 编辑

http://www.itpub.net/showthread.php?s=&postid=3832527#post3832527

在10g中使用toad的sql编辑器,如果打开autotrace,执行sql发现auto trace中的显示信息
与8i 下不同,使用sqlmonitor跟踪后发现如下问题:


0g下:
Timestamp: 10:35:50.021
select sid from V$SESSION where audsid = ( select USERENV('SESSIONID') from dual )
----------------------------------
Timestamp: 10:35:50.141
SELECT PT.VALUE, sn.Name FROM v$statname sn, SYS.V_$SESSTAT PT WHERE sn.statistic#=pt.statistic# and PT.SID=:CSID AND
PT.STATISTIC# IN (7,41,44,48,133,304,305,306,310,311)ORDER BY PT.STATISTIC#
CSID = 444
----------------------------------
Timestamp: 10:35:50.221
select sysdate from dual
----------------------------------
Timestamp: 10:35:50.261
SELECT PT.VALUE, sn.Name FROM v$statname sn, SYS.V_$SESSTAT PT WHERE sn.statistic#=pt.statistic# and PT.SID=:CSID AND
PT.STATISTIC# IN (7,41,44,48,133,304,305,306,310,311)ORDER BY PT.STATISTIC#
CSID = 444


8i下:
---------------------------------
Timestamp: 10:38:58.592
SELECT PT.VALUE FROM SYS.V_$SESSTAT PT WHERE PT.SID=:1 AND PT.STATISTIC# IN (7,47,50,54,134,335,336,337,341,342) ORDER BY
PT.STATISTIC#
:1 = 367
----------------------------------
Timestamp: 10:38:58.622
select sysdate from dual
----------------------------------
Timestamp: 10:38:58.642
SELECT PT.VALUE FROM SYS.V_$SESSTAT PT WHERE PT.SID=:1 AND PT.STATISTIC# IN (7,47,50,54,134,335,336,337,341,342) ORDER BY
PT.STATISTIC#
:1 = 367

很明显 PT.STATISTIC#的取值完全不一样。
看来这个是toad在10g的一个bug。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-82826/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2485
  • 访问量
    6290940