   |  | | Strange snapshot too old during a select statement | Strange snapshot too old during a select statement 2004-03-11 - By Justin Cave (DDBC)
I 'll wager that what is happening is the following:
1) Your long SELECT starts and the system notes that the system change number (SCN) is x
2) Another transaction comes along and updates a row. The current version of the row has a SCN of x+1. The old version of the row, the one from SCN x, is stored in the rollback segments (or UNDO)
3) At some point, your SELECT needs to read this block as of SCN x, so it has to visit the rollback segment to get the old version of the data.
4) When Oracle visits the rollback segment, it finds that the data has been overwritten. Since Oracle cannot reconstruct a picture of the data at SCN x, it throws the ORA-01555 (See ORA-01555.ora-code.com) error.
If you were using UNDO, this would be a bit easier to deal with-you would set the undo retention time to the length of your query and ensure that you throw enough disk in to handle the UNDO generation for that amount of time. When you 're dealing with rollback segments, though, you have to figure out why the data is no longer available when the query wants it. You may have too few rollback segments, you may have rollback segments whose OPTIMAL values are too small, your rollback segment size may be too small.
Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
__ ____ ____ ____ ____ ____ ____
From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)] On Behalf Of NGUYEN Philippe (Cetelem)
Sent: Thursday, March 11, 2004 1:46 AM
To: 'oracle-l@(protected) '
Subject: Strange snapshot too old during a select statement
Importance: High
Hi list!
we encounter a very strange "ORA-01555 (See ORA-01555.ora-code.com) : snapshot too old :rollback segment number 3 with name "_SYSSMU3$ " too small "
This is a very long query
With a query that only make a select statement.
We have open a TAR with Oracle Support but they say that it 's not possible since this only a "select " statement ?!!
Any idea ?
TIA
Philippe
<html xmlns:v= "urn:schemas-microsoft-com:vml " xmlns:o= "urn:schemas-microsoft-com:office:office " xmlns:w= "urn:schemas-microsoft-com:office:word " xmlns:st1= "urn:schemas-microsoft-com:office:smarttags " xmlns= "http://www.w3.org/TR/REC-html40 " >
<head >
<meta http-equiv=Content-Type content= "text/html; charset=iso-8859-1 " >
<meta name=Generator content= "Microsoft Word 11 (filtered medium) " >
<!--[if !mso] >
<style >
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style >
<![endif]-- >
<title >Strange snapshot too old during a select statement </title >
<o:SmartTagType namespaceuri= "urn:schemas-microsoft-com:office:smarttags "
name= "PlaceName "/ >
<o:SmartTagType namespaceuri= "urn:schemas-microsoft-com:office:smarttags "
name= "place "/ >
<!--[if !mso] >
<style >
st1\:*{behavior:url(#default#ieooui) }
</style >
<![endif]-- >
<style >
<!--
/* Font Definitions */
@(protected)
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family: "Times New Roman ";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family: "Times New Roman ";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@(protected) Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
/* List Definitions */
@(protected) l0
{mso-list-id:676811598;
mso-list-type:hybrid;
mso-list-template-ids:112650656 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@(protected) l0:level1
{mso-level-text: "%1\) ";
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-- >
</style >
</head >
<body lang=EN-US link=blue vlink=purple >
<div class=Section1 >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' >I’ll wager that what is happening is
the following: <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' > <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal style= 'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1 ' > <![if !supportLists] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' > <span style= 'mso-list:Ignore ' >1) <font size=1 face= "Times New Roman " > <span
style= 'font:7.0pt "Times New Roman " ' > </span > </font > </span > </span > </font > <![endif] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' >Your long SELECT starts and the system notes that the system change
number (SCN) is x <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal style= 'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1 ' > <![if !supportLists] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' > <span style= 'mso-list:Ignore ' >2) <font size=1 face= "Times New Roman " > <span
style= 'font:7.0pt "Times New Roman " ' > </span > </font > </span > </span > </font > <![endif] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' >Another transaction comes along and updates a row.? The current
version of the row has a SCN of x+1.? The old version of the row, the one from
SCN x, is stored in the rollback segments (or UNDO) <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal style= 'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1 ' > <![if !supportLists] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' > <span style= 'mso-list:Ignore ' >3) <font size=1 face= "Times New Roman " > <span
style= 'font:7.0pt "Times New Roman " ' > </span > </font > </span > </span > </font > <![endif] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' >At some point, your SELECT needs to read this block as of SCN x, so
it has to visit the rollback segment to get the old version of the data. <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal style= 'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1 ' > <![if !supportLists] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' > <span style= 'mso-list:Ignore ' >4) <font size=1 face= "Times New Roman " > <span
style= 'font:7.0pt "Times New Roman " ' > </span > </font > </span > </span > </font > <![endif] > <font
size=2 color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' >When Oracle visits the rollback segment, it finds that the data has
been overwritten.? Since Oracle cannot reconstruct a picture of the data at SCN
x, it throws the ORA-01555 (See ORA-01555.ora-code.com) error. <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' > <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' >If you were using UNDO, this would be a
bit easier to deal with—you would set the undo retention time to the
length of your query and ensure that you throw enough disk in to handle the
UNDO generation for that amount of time.? When you’re dealing with
rollback segments, though, you have to figure out why the data is no longer
available when the query wants it.? You may have too few rollback segments, you
may have rollback segments whose OPTIMAL values are too small, your rollback
segment size may be too small. <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' > <o:p > </o:p > </span > </font > </p >
<div >
<p class=MsoNormal > <st1:place w:st= "on " > <st1:PlaceName w:st= "on " > <font size=2
color=navy face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;
color:navy ' >Justin </span > </font > </st1:PlaceName > <font size=2 color=navy
face=Arial > <span style= 'font-size:10.0pt;font-family:Arial;color:navy ' > <st1:PlaceName
w:st= "on " >Cave </st1:PlaceName > </span > </font > </st1:place > <font color=navy > <span
style= 'color:navy ' > <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' >Distributed Database Consulting, Inc. </span > </font > <font
color=navy > <span style= 'color:navy ' > <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=2 color=navy face=Arial > <span style= 'font-size:
10.0pt;font-family:Arial;color:navy ' > <a href= "http://www.ddbcinc.com/askDDBC " >http://www.ddbcinc.com/askDDBC </a > <o:p > </o:p > </span > </font > </p >
<p class=MsoNormal > <font size=3 face= "Times New Roman " > <span style= 'font-size:
12.0pt ' > <o:p > </o:p > </span > </font > </p >
</div >
<div >
<div class=MsoNormal align=center style= 'text-align:center ' > <font size=3
face= "Times New Roman " > <span style= 'font-size:12.0pt ' >
<hr size=2 width= "100% " align=center tabindex=-1 >
</span > </font > </div >
<p class=MsoNormal > <b > <font size=2 face=Tahoma > <span style= 'font-size:10.0pt;
font-family:Tahoma;font-weight:bold ' >From: </span > </font > </b > <font size=2
face=Tahoma > <span style= 'font-size:10.0pt;font-family:Tahoma ' >
oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)] <b > <span
style= 'font-weight:bold ' >On Behalf Of </span > </b >NGUYEN Philippe (Cetelem) <br >
<b > <span style= 'font-weight:bold ' >Sent: </span > </b > Thursday, March 11, 2004
1:46 AM <br >
<b > <span style= 'font-weight:bold ' >To: </span > </b > 'oracle-l@(protected) ' <br >
<b > <span style= 'font-weight:bold ' >Subject: </span > </b > Strange snapshot too old
during a select statement <br >
<b > <span style= 'font-weight:bold ' >Importance: </span > </b > High </span > </font > <o:p > </o:p > </p >
</div >
<p class=MsoNormal > <font size=3 face= "Times New Roman " > <span style= 'font-size:
12.0pt ' > <o:p > </o:p > </span > </font > </p >
<p > <font size=2 face= "Times New Roman " > <span style= 'font-size:10.0pt ' >Hi list! </span > </font >
<br >
<font size=2 > <span style= 'font-size:10.0pt ' >we encounter a very strange
"ORA-01555 (See ORA-01555.ora-code.com) : snapshot too old :rollback segment number 3 with name
"_SYSSMU3$" too small" </span > </font > <br >
<font size=2 > <span style= 'font-size:10.0pt ' >This is a very long query </span > </font > <br >
<font size=2 > <span style= 'font-size:10.0pt ' >With a query that only make a
select statement. </span > </font > <br >
<font size=2 > <span style= 'font-size:10.0pt ' >We have open a TAR with Oracle
Support but they say that it 's not possible since this only a
"select" statement ?!! </span > </font > <br >
<font size=2 > <span style= 'font-size:10.0pt ' >Any idea ? </span > </font > <o:p > </o:p > </p >
<p > <font size=2 face= "Times New Roman " > <span style= 'font-size:10.0pt ' >TIA </span > </font >
<br >
<font size=2 > <span style= 'font-size:10.0pt ' >Philippe </span > </font > <o:p > </o:p > </p >
</div >
</body >
</html >
|
|
 |