10g 中使用toad的sql編輯的autotrace的問題?

lfree發表於2006-04-03

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章