why this query is utilizing my undo so rapidly? [message #584292] |
Sat, 11 May 2013 03:44 |
|
piotrtal
Messages: 168 Registered: June 2011 Location: Poland/Czestochowa
|
Senior Member |
|
|
hi,
i can't find reason why this query is utilizing my undo space. when I am running this query stright from sqlplus it executes fast, but in v$undostat it is identified as long running - but why? it is some kind of oracle background query from streams module, but on this database I am not running streams.
SQL> SELECT s.SQL_TEXT, s.FETCHES, s.EXECUTIONS, st.begin_time, st.end_time, st.UNDOBLKS, st.TXNCOUNT, st.maxquerylen
2 FROM v$undostat st INNER JOIN
3 v$sql s ON s.sql_id = st.maxqueryid
4 ;
SQL_TEXT FETCHES EXECUTIONS BEGIN_TI END_TIME UNDOBLKS TXNCOUNT MAXQUERYLEN
-------------------- ---------- ---------- -------- -------- ---------- ---------- -----------
select 1 from obj$ w 2 2 13/05/11 13/05/11 24 303 857
here name='DBA_QUEUE
_SCHEDULES'
select 1 from obj$ w 2 2 13/05/11 13/05/11 605 986 556
here name='DBA_QUEUE
_SCHEDULES'
select 1 from obj$ w 2 2 13/05/11 13/05/11 431 1091 1158
here name='DBA_QUEUE
_SCHEDULES'
SQL_TEXT FETCHES EXECUTIONS BEGIN_TI END_TIME UNDOBLKS TXNCOUNT MAXQUERYLEN
-------------------- ---------- ---------- -------- -------- ---------- ---------- -----------
select 1 from obj$ w 2 2 13/05/11 13/05/11 450 1312 555
here name='DBA_QUEUE
_SCHEDULES'
select 1 from obj$ w 2 2 13/05/11 13/05/11 62 700 1158
here name='DBA_QUEUE
_SCHEDULES'
select 1 from obj$ w 2 2 13/05/11 13/05/11 659 2034 556
here name='DBA_QUEUE
SQL_TEXT FETCHES EXECUTIONS BEGIN_TI END_TIME UNDOBLKS TXNCOUNT MAXQUERYLEN
-------------------- ---------- ---------- -------- -------- ---------- ---------- -----------
_SCHEDULES'
[Updated on: Sat, 11 May 2013 03:49] Report message to a moderator
|
|
|
|
|
Re: why this query is utilizing my undo so rapidly? [message #584304 is a reply to message #584302] |
Sat, 11 May 2013 09:19 |
|
piotrtal
Messages: 168 Registered: June 2011 Location: Poland/Czestochowa
|
Senior Member |
|
|
maybe I am sick (like you are saying) BlackSwan, but I am trying to find answer why this query is described as long running query in v$undostat. it should not appear because executing this query from another session takes miliseconds to get result. I am 100% percent sure that my database is executing much more utilizing queries but for sure not this one should appear in v$undostat in 95% cases.
[Updated on: Sat, 11 May 2013 09:20] Report message to a moderator
|
|
|
|
|
|
|
Re: why this query is utilizing my undo so rapidly? [message #584313 is a reply to message #584309] |
Sat, 11 May 2013 14:31 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:this query is reported as long running and utilizing so much my undo tablespace I have no idea why this query is reported as long running (I get the same result, 11.2.0.3 Win32) but I must correct the second part of your statement above: the figures for UNDOBLKS are the number of blocks of undo generated in the ten minute period by all work in the database: nothing to do with the query.
|
|
|
Re: why this query is utilizing my undo so rapidly? [message #584314 is a reply to message #584313] |
Sat, 11 May 2013 14:39 |
|
piotrtal
Messages: 168 Registered: June 2011 Location: Poland/Czestochowa
|
Senior Member |
|
|
yes John. UNDOBLKS and numbers in this columns are not high in my example - I wasn't worried about that. the only issue for me was MAXQUERYLEN column which seems for me very strange considering fact that this query is realy simple.
i think that maybe this issue happens because some kind of bug like you are saying.
thanks a lot for helping me.
[Updated on: Sat, 11 May 2013 14:41] Report message to a moderator
|
|
|