Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: AW: Extremely slow querry
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFFEFB.5DDFBE30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You should analyze FOR TABLE FOR ALL INDEXES FOR ALL COLUMNS, not only =
FOR
ALL INDEXED COLUMNS. Optimizer gets useful info from analyzing =
non-indexed
columns also.
Alex Hillman
-----Original Message-----
From: Vidya Kalyanaraman [mailto:kvidya13_at_hotmail.com]
Sent: Friday, August 04, 2000 11:58 AM
To: Multiple recipients of list ORACLE-L
Subject: Re: AW: Extremely slow querry
Hi Volker
Normally when u analyze a table, all the associated indexes are=20
automatically analyzed as well.
But from 7.3.4, you have a better way to analyze table/indexes with
"FOR" clause of ANALYZE command.
ANALYZE TABLE table_name COMPUTE STATISTICS FOR TABLE FOR ALL INDEXED=20
COLUMNS;
You can specify the percentage sampling for ESTIMATE statistics, but =
again=20
if you specifiy more than 40% or 50%(I am not really sure about exact=20
value), it is similar to COMPUTE statistics.
Hope it helps
Thanks
Vidya
Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
Date: Fri, 04 Aug 2000 02:18:43 -0800
analyze table PS_JOB JOB compute statistics; analyze table PS_FAST_SCRTY_2 SEC compute statistics;
do the same for indexes on this tables
analyze index i???? compute statistics;
Volker Sch=F6n
E-Mail: mailto:v.schoen_at_inplan.de <mailto:v.schoen_at_inplan.de>
http://www.inplan.de <http://www.inplan.de/>
-----Urspr=FCngliche Nachricht-----
Von: Siva_Chintalapati [mailto:Siva_Chintalapati_at_satyam.com]
Gesendet: Freitag, 4. August 2000 08:34
An: Multiple recipients of list ORACLE-L
Betreff: RE: Extremely slow querry
Hello ,
Please say me how to compute and estimate stastics.
Regards
Siva
Just a thought,
Try analyzing the indexes on those tables. Also, if possible,
try to use COMPUTE instead of ESTIMATE.
Do the Explain Plan again and compare it with the previous one.
Suggestion: you might want to run a script to analyze the
objects(tables,
indexes, etc.) on a regular basis using cron.
HTP.
Gunawan Yuwono
Oracle DBA
Kansas City, MO
>--- Original Message ---
>
--
Author: Gunawan Yuwono
INET: gunawan.yuwono_at_webbox.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
________________________________________________________________________=
Get Your Private, Free E-mail from MSN Hotmail at = http://www.hotmail.com
--=20
Author: Vidya Kalyanaraman
INET: kvidya13_at_hotmail.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
------_=_NextPart_001_01BFFEFB.5DDFBE30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3Diso-8859-1">
<TITLE>RE: AW: Extremely slow querry</TITLE> </HEAD> <BODY>
<P><FONT SIZE=3D2>You should analyze FOR TABLE FOR ALL INDEXES FOR ALL = COLUMNS, not only FOR ALL INDEXED COLUMNS. Optimizer gets useful info = from analyzing non-indexed columns also.</FONT></P>
<P><FONT SIZE=3D2>Alex Hillman</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Vidya Kalyanaraman [<A = HREF=3D"mailto:kvidya13_at_hotmail.com">mailto:kvidya13_at_hotmail.com</A>]</F=
ONT> <BR><FONT SIZE=3D2>Sent: Friday, August 04, 2000 11:58 AM</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=3D2>Subject: Re: AW: Extremely slow querry</FONT> </P> <BR>
<P><FONT SIZE=3D2>Hi Volker</FONT>
</P>
<P><FONT SIZE=3D2>Normally when u analyze a table, all the associated =
indexes are </FONT> <BR><FONT SIZE=3D2>automatically analyzed as well.</FONT> <BR><FONT SIZE=3D2>But from 7.3.4, you have a better way to analyze =table/indexes with</FONT>
<P><FONT SIZE=3D2>You can specify the percentage sampling for ESTIMATE =
statistics, but again </FONT>
<BR><FONT SIZE=3D2>if you specifiy more than 40% or 50%(I am not really =
sure about exact </FONT>
<BR><FONT SIZE=3D2>value), it is similar to COMPUTE statistics.</FONT>
</P>
<P><FONT SIZE=3D2>Hope it helps</FONT> <BR><FONT SIZE=3D2>Thanks</FONT> <BR><FONT SIZE=3D2>Vidya</FONT> </P> <BR>
<P><FONT SIZE=3D2>Reply-To: ORACLE-L_at_fatcity.com</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L =
<ORACLE-L_at_fatcity.com></FONT>
<BR><FONT SIZE=3D2>Date: Fri, 04 Aug 2000 02:18:43 -0800</FONT>
</P>
<P><FONT SIZE=3D2>analyze table PS_JOB JOB compute statistics;</FONT>
<BR><FONT SIZE=3D2>analyze table PS_FAST_SCRTY_2 SEC compute =
statistics;</FONT>
</P>
<P><FONT SIZE=3D2>do the same for indexes on this tables</FONT> </P>
<P><FONT SIZE=3D2>analyze index i???? compute statistics;</FONT> </P>
<P><FONT SIZE=3D2>Volker Sch=F6n</FONT>
<BR><FONT SIZE=3D2>E-Mail: <A =
HREF=3D"mailto:v.schoen_at_inplan.de">mailto:v.schoen_at_inplan.de</A> <<A =
HREF=3D"mailto:v.schoen_at_inplan.de">mailto:v.schoen_at_inplan.de</A>></FO=
NT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.inplan.de" =
TARGET=3D"_blank">http://www.inplan.de</A> <<A =
HREF=3D"http://www.inplan.de/" =
TARGET=3D"_blank">http://www.inplan.de/</A>></FONT>
</P>
<P><FONT SIZE=3D2>-----Urspr=FCngliche Nachricht-----</FONT> <BR><FONT SIZE=3D2>Von: Siva_Chintalapati [<A = HREF=3D"mailto:Siva_Chintalapati_at_satyam.com">mailto:Siva_Chintalapati_at_sa= tyam.com</A>]</FONT>
<BR><FONT SIZE=3D2>Gesendet: Freitag, 4. August 2000 08:34</FONT> <BR><FONT SIZE=3D2>An: Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=3D2>Betreff: RE: Extremely slow querry</FONT> </P> <BR> <BR>
<P><FONT SIZE=3D2>Hello ,</FONT>
<BR><FONT SIZE=3D2>Please say me how to compute and estimate =
stastics.</FONT>
</P>
<P><FONT SIZE=3D2>Regards</FONT> <BR><FONT SIZE=3D2>Siva</FONT> </P>
<P> <FONT =
SIZE=3D2>----------</FONT>
<BR><FONT SIZE=3D2>Reply To: =
ORACLE-L_at_fatcity.com</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, August 03, 2000 7:16 =
PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of =
list ORACLE-L</FONT>
</P>
<BR>
<P> <FONT SIZE=3D2>Just a =
thought,</FONT>
<BR><FONT SIZE=3D2>Try analyzing the indexes on those tables. Also, if =
possible,</FONT>
<BR><FONT SIZE=3D2>try to use COMPUTE instead of ESTIMATE.</FONT>
</P>
<P> <FONT SIZE=3D2>Do the = Explain Plan again and compare it with the previous one.</FONT> </P>
<P> <FONT = SIZE=3D2>Suggestion: you might want to run a script to analyze = the</FONT>
<BR><FONT SIZE=3D2>objects(tables,</FONT> <BR><FONT SIZE=3D2>indexes, etc.) on a regular basis using cron.</FONT> </P>
<P> <FONT =
SIZE=3D2>HTP.</FONT>
</P>
<P> <FONT SIZE=3D2>Gunawan = Yuwono</FONT>
<BR><FONT SIZE=3D2>Oracle DBA</FONT> <BR><FONT SIZE=3D2>Kansas City, MO</FONT> </P>
<P> <FONT SIZE=3D2>>--- =
Original Message ---</FONT>
<BR><FONT SIZE=3D2> >From: "Jack van Zanen" =
<nlzanen1_at_ey.nl></FONT>
<BR><FONT SIZE=3D2> >To: Multiple recipients of list ORACLE-L =
<ORACLE-L_at_fatcity.com></FONT>
<BR><FONT SIZE=3D2> >Date: 8/3/00 11:25:28 AM</FONT> <BR><FONT SIZE=3D2> ></FONT> </P>
<P> <FONT = SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >Hi All,</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >Peoplesoap database</FONT> <BR><FONT SIZE=3D2> >Oracle 8.0.5</FONT> <BR><FONT SIZE=3D2> >AIX 4.3.2</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >*************</FONT> <BR><FONT SIZE=3D2> >SELECT</FONT> <BR><FONT SIZE=3D2> > JOB.EMPLID,</FONT> <BR><FONT SIZE=3D2> > JOB.EMPL_RCD#,</FONT> <BR><FONT SIZE=3D2> > SEC.OPRCLASS,</FONT> <BR><FONT SIZE=3D2> > SEC.ACCESS_CD</FONT> <BR><FONT SIZE=3D2> >FROM</FONT> <BR><FONT SIZE=3D2> > PS_JOB JOB,</FONT> <BR><FONT SIZE=3D2> > PS_FAST_SCRTY_2 =SEC</FONT>
<BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >****************</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >This is a select that is part of a PS view =(stripped version)</FONT>
<BR><FONT SIZE=3D2>and takes 30</FONT> <BR><FONT SIZE=3D2> >minutes to run</FONT> <BR><FONT SIZE=3D2> >The explain plan shows just a nested loop =with the smaller table</FONT>
<BR><FONT SIZE=3D2>all needed</FONT> <BR><FONT SIZE=3D2> >information comes out of the index.</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >This is a small database on a machine that =should be capable</FONT>
<BR><FONT SIZE=3D2>of a lot more.</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >Anybody any idea???</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D</FONT>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D</FONT>
<BR><FONT SIZE=3D2>in its</FONT> <BR><FONT SIZE=3D2> >receipt.</FONT> <BR><FONT =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D</FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> >--</FONT> <BR><FONT SIZE=3D2> >Author: Jack van Zanen</FONT> <BR><FONT SIZE=3D2> > INET: nlzanen1_at_ey.nl</FONT><BR><FONT SIZE=3D2> ></FONT>
SIZE=3D2> >-----------------------------------------------------=---------------</FONT>
<BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2> ></FONT> <BR><FONT SIZE=3D2>----------------</FONT> <BR><FONT SIZE=3D2>Sent from a WebBox - <A =HREF=3D"http://www.webbox.com" =
<BR><FONT SIZE=3D2>Great Ways to Share them with Others!</FONT> </P> <BR> <P> <FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Author: Gunawan Yuwono</FONT><BR><FONT SIZE=3D2> INET: gunawan.yuwono_at_webbox.com</FONT> </P>
<P> <FONT SIZE=3D2>Fat City =
Network Services -- (858) 538-5051 FAX: (858) =
538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=-----</FONT>
<P><FONT =
SIZE=3D2>_______________________________________________________________=_________</FONT>
<P><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Author: Vidya Kalyanaraman</FONT> <BR><FONT SIZE=3D2> INET: kvidya13_at_hotmail.com</FONT> </P>
<P><FONT SIZE=3D2>Fat City Network Services -- (858) =
538-5051 FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=Received on Sat Aug 05 2000 - 11:36:55 CDT