Mailing List
Home
Forum Home
Oracle List - by freelists.org
Oracle on SUSE Linux - Runing Oracle on SUSE Linux
Oracle database error code ...
www.freelists.org
Subjects
ORA 12540: TNS:internal limit restriction exceeded
ORA 12838 please : Is possible to append two times to the same table befo
ORA 12838 please : Is possible to append two times to the same table before
ora 04031
ora 12500 on windows
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 01925: maximum of 30 enabled roles exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ora 12500 on windows
ORA 01650, one idea
ORA 01650
ORA 4030
ORA 12838 please : Is possible to append two times to thesametable before do
ORA 12838 please : Is possible to append two times to thesame table before d
ORA 01536
ORA 03113 end of file on communication channel
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 00600:
ORA 00020: maximum number of processes (%s) exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ORA 3113 while creating a cluster database 9201 RAC on Linux with OCFS
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 01650, one idea
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 2000 Error Using DBMS STATS GATHER SCHEMA STATS
ORA 01650, one idea
ORA 01650, one idea
ORA 01650, one idea
ORA 01650
ORA 01650
ORA 01031
ORA 4030
ORA 4030
ORA 06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
ORA 01722 invalid number
 
-none-

-none-

2007-10-02       - By D'Hooge Freek

 Back
Do you use a bind variable for the ssn column in the query?
If so, it could be that because of bind variable peeking you are now using a
different access plan.

regards,

Freek D'Hooge
Uptime
Oracle Database Administrator
e-mail: freek.dhooge@(protected) <mailto:freek.dhooge@(protected)>
http://www.uptime.be <http://www.uptime.be/>
disclaimer <http://www.uptime.be/disclaimer.html>


__ ____ ____ ____ ____ ____ ____

Van: oracle-l-bounce@(protected) namens Mercadante, Thomas F (LABOR)
Verzonden: di 2/10/2007 17:12
Aan: oracle-l@(protected)
Onderwerp: Very Strange Query Access Plan



All,



Running on 9.2.0.7 on Aix.



I have a database table with 18 million rows in it.  There is an SSN column in
the table.  Only 625,000 rows have an SSN populated.  I also have an index on
this column.  Statistics on both the table and index are gathered nightly
(using dbms_stats with the estimated and default sample options).



Yesterday, queries against this table used the index.  Today, they do not.
There was no large data load overnight.  We add about 10,000 records per day.
This behavior has happened before where the index gets ignored for a day and
then used the next day.

I really need to use an index here.  Queries via ssn are executed all day long
and take 10 minutes to complete.  CPU is pegged at 99%.


What am I missing?  Maybe histograms?  Haven't used them before, so any
suggestions would be helpful.


Thanks


Tom


<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR>
<STYLE>
<!--
                       
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;}
span.EmailStyle17
  {
  font-family:Arial;
  color:windowtext;}

div.Section1
  {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV id=idOWAReplyText80695 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Do you use a bind variable
for the ssn column in the query?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>If so,&nbsp;it could be that because of
&nbsp;bind variable peeking you are now using a different access plan.</FONT><
/DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>regards,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature13400 dir=ltr>
<DIV><FONT face=Arial size=2>Freek D'Hooge</FONT></DIV>
<DIV><FONT face=Arial size=2>Uptime</FONT></DIV>
<DIV><FONT face=Arial size=2>Oracle Database Administrator</FONT></DIV>
<DIV><FONT face=Arial size=2>e-mail: </FONT><A href="mailto:freek.dhooge@(protected)
.be"><FONT face=Arial size=2>freek.dhooge@(protected)</FONT></A></DIV>
<DIV><A href="http://www.uptime.be/"><FONT face=Arial size=2>http://www.uptime
.be</FONT></A></DIV>
<DIV><SPAN lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font
-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family:
'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: NL-BE; mso
-bidi-language: AR-SA; mso-no-proof: yes"><A href="http://www.uptime.be
/disclaimer.html"><SPAN style="mso-bidi-font-size: 10.0pt; mso-bidi-font-family:
Arial">disclaimer</SPAN></A></SPAN></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Van:</B> oracle-l-bounce@(protected) namens
Mercadante, Thomas F (LABOR)<BR><B>Verzonden:</B> di 2/10/2007 17:12<BR><B>Aan:
</B> oracle-l@(protected)<BR><B>Onderwerp:</B> Very Strange Query Access Plan
<BR></FONT><BR></DIV>
<DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial">All,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial">Running on 9.2.0.7 on Aix.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial">I have a database table with 18 million rows in it. &nbsp;There
is an SSN column in the table. &nbsp;Only 625,000 rows have an SSN populated.
&nbsp; I also have an index on this column. &nbsp;Statistics on both the table
and index are gathered nightly (using dbms_stats with the estimated and default
sample options).</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial">Yesterday, queries against this table used the index. &nbsp
;Today, they do not.&nbsp; There was no large data load overnight. &nbsp;We add
about 10,000 records per day.&nbsp; This behavior has happened before where the
index gets ignored for a day and then used the next day.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial">I really need to use an index here.&nbsp; Queries via ssn are
executed all day long and take 10 minutes to complete.&nbsp; CPU is pegged at
99%.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"><BR>What am I missing?&nbsp; Maybe histograms? &nbsp;Haven&#8217
;t used them before, so any suggestions would be helpful.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"><BR>Thanks</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT
-FAMILY: Arial"><BR>Tom</SPAN></FONT></P></DIV></DIV></BODY></HTML>