Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: extremely long parse time
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C2689F.0E9DCB8A"
------_=_NextPart_001_01C2689F.0E9DCB8A
Content-Type: text/plain;
charset="iso-8859-1"
We are using First_rows for the optimizer mode, but the last_analyzed column in DBA_TABLES and DBA_INDEXES is NULL for all objects owned by SYS.
The really wierd part is: Changing the query to use rule based optimization (via the /*+ RULE */ hint caused it to execute sub-second.
Why would optimization mode affect parsing? Is query optimization considered part of the parsing routine?
Matt
-----Original Message-----
Sent: Monday, September 30, 2002 11:36 AM
To: 'ORACLE-L_at_fatcity.com'
Cc: Adams, Matthew (GEA, MABG, 088130)
Hmmmm, also running on 8.1.7.2 on HPUX 11, this comes back to me sub-second. My explain plan pukes in TOAD, but that's a TOAD issue...everything looks good in SQL*Plus.
I also have:
optimizer_index_caching = 90 optimizer_index_cost_adj = 50
HTH! GL! :)
Rich Jesse System/Database Administrator Rich.Jesse_at_qtiworld.com Quad/Tech International, Sussex, WI USA
-----Original Message-----
Sent: Monday, September 30, 2002 10:04 AM
To: Multiple recipients of list ORACLE-L
Nope, Oracle 8.1.7.2 on HP-UX 11. 148 seconds on the wall clock to parse:
select
null as table_cat, owner as table_schem, table_name,
0 as NON_UNIQUE, null as index_qualifier, null as index_name,
0 as type, 0 as ordinal_position, null as column_name, null as asc_or_desc,
num_rows as cardinality, blocks as pages, null as filter_condition
from all_tables
where table_name = 'INDEXENTRIES'
union
select null as table_cat, i.owner as table_schem, i.table_name, decode (i.uniqueness, 'UNIQUE', 0, 1), null as index_qualifier, i.index_name, 1 as type, c.column_position as ordinal_position,c.column_name, null as asc_or_desc, i.distinct_keys as cardinality, i.leaf_blocks as pages, null as filter_condition from all_indexes i,
i.index_name = c.index_name and i.table_owner = c.table_owner and i.table_name = c.table_name and i.owner = c.index_owner
-----Original Message-----
[mailto:Alexander.Feinstein_at_mitchell1.com]
Sent: Friday, September 27, 2002 4:28 PM
To: Multiple recipients of list ORACLE-L
Matt,
Is it Oracle 9?
If yes, time is in microseconds.
Alex.
-----Original Message-----
Sent: Thursday, September 26, 2002 10:30 AM
To: Multiple recipients of list ORACLE-L
why would a query take 148 seconds to
parse? It is a two way union
where the first half is going against all_tables
and the second half is a join
between all_indexes and all_ind_columns.
The shared pool has 50M large parts of it are
free. I generated a 10046 (level 12) trace, and I just
don't see anything out of whack, except of the
c=14868 in the PARSE #1 line.
------_=_NextPart_001_01C2689F.0E9DCB8A
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">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>RE: extremely long parse time</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>We are using First_rows for the optimizer mode, =
</FONT>
<BR><FONT SIZE=3D2>but the last_analyzed column in DBA_TABLES =
and</FONT>
<BR><FONT SIZE=3D2>DBA_INDEXES is NULL for all objects owned by =
SYS.</FONT>
</P>
<P><FONT SIZE=3D2>The really wierd part is: Changing the query =
</FONT>
<BR><FONT SIZE=3D2>to use rule based optimization (via the /*+ RULE */ =
hint</FONT>
<BR><FONT SIZE=3D2>caused it to execute sub-second. </FONT>
</P>
<P><FONT SIZE=3D2>Why would optimization mode affect parsing? Is =
query</FONT>
<BR><FONT SIZE=3D2>optimization considered part of the parsing =
routine?</FONT>
</P>
<P><FONT SIZE=3D2>Matt</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Jesse, Rich [<A =
HREF=3D"mailto:Rich.Jesse_at_qtiworld.com">mailto:Rich.Jesse_at_qtiworld.com</=
A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, September 30, 2002 11:36 AM</FONT>
<BR><FONT SIZE=3D2>To: 'ORACLE-L_at_fatcity.com'</FONT>
<BR><FONT SIZE=3D2>Cc: Adams, Matthew (GEA, MABG, 088130)</FONT>
<BR><FONT SIZE=3D2>Subject: RE: extremely long parse time</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Hmmmm, also running on 8.1.7.2 on HPUX 11, this comes =
back to me sub-second.</FONT>
<BR><FONT SIZE=3D2>My explain plan pukes in TOAD, but that's a TOAD =
issue...everything looks</FONT>
<BR><FONT SIZE=3D2>good in SQL*Plus.</FONT>
</P>
<P><FONT SIZE=3D2>1) Are you using CBO?</FONT>
</P>
<P><FONT SIZE=3D2>2) If "yes" from 1, verify that there are =
no stats gathered in SYS.</FONT>
</P>
<P><FONT SIZE=3D2>3) Try init.ora "optimizer_max_permutations =3D =
2000". The default is "80000"</FONT>
<BR><FONT SIZE=3D2>in 8 and 8i and "2000" in 9i. Aside =
from cursor_sharing=3Dforce, that's the</FONT>
<BR><FONT SIZE=3D2>only parameter I have that I think could affect =
parse times that severely. </FONT>
</P>
<P><FONT SIZE=3D2>I also have:</FONT>
<BR> <FONT =
SIZE=3D2>optimizer_index_caching =3D 90</FONT>
<BR> <FONT =
SIZE=3D2>optimizer_index_cost_adj =3D 50</FONT>
<BR><FONT SIZE=3D2>in my init.ora, in case those might also somehow =
affect parse time. I</FONT>
<BR><FONT SIZE=3D2>wouldn't think it would in this case, since these =
should be CBO-only and</FONT>
<BR><FONT SIZE=3D2>there shouldn't be stats on the data =
dictionary.</FONT>
</P>
<P><FONT SIZE=3D2>HTH! GL! :)</FONT>
</P>
<P><FONT SIZE=3D2>Rich =
Jesse &= nbsp; &= nbsp; System/Database Administrator</FONT>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Adams, Matthew (GEA, MABG, 088130) [<A =
HREF=3D"mailto:MATT.ADAMS_at_APPL.GE.COM">mailto:MATT.ADAMS_at_APPL.GE.COM</A>=
]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, September 30, 2002 10:04 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: RE: extremely long parse time</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Nope, Oracle 8.1.7.2 on HP-UX 11. 148 =
seconds</FONT>
<BR><FONT SIZE=3D2>on the wall clock to parse:</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2>select </FONT>
<BR><FONT SIZE=3D2>null as table_cat, owner as table_schem, table_name, =
</FONT>
<BR><FONT SIZE=3D2>0 as NON_UNIQUE, null as index_qualifier, null as =
index_name, </FONT>
<BR><FONT SIZE=3D2>0 as type, 0 as ordinal_position, null as =
column_name, null as asc_or_desc, </FONT>
<BR><FONT SIZE=3D2>num_rows as cardinality, blocks as pages, null as =
filter_condition</FONT>
<BR><FONT SIZE=3D2>from all_tables</FONT>
<BR><FONT SIZE=3D2>where table_name =3D 'INDEXENTRIES'</FONT>
<BR><FONT SIZE=3D2>union </FONT>
<BR><FONT SIZE=3D2>select null as table_cat, i.owner as table_schem, =
i.table_name, </FONT>
<BR><FONT SIZE=3D2>decode (i.uniqueness, 'UNIQUE', 0, 1), null as =
index_qualifier, </FONT>
<BR><FONT SIZE=3D2>i.index_name, 1 as type, c.column_position as =
ordinal_position, </FONT>
<BR><FONT SIZE=3D2>c.column_name, null as asc_or_desc, i.distinct_keys =
as cardinality,</FONT>
<BR><FONT SIZE=3D2> i.leaf_blocks as pages, null as =
filter_condition</FONT>
<BR><FONT SIZE=3D2>from all_indexes i,</FONT>
<BR><FONT SIZE=3D2>all_ind_columns c</FONT>
<BR><FONT SIZE=3D2>where i.table_name =3D 'INDEXENTRIES' and</FONT>
<BR><FONT SIZE=3D2>i.index_name =3D c.index_name and</FONT>
<BR><FONT SIZE=3D2>i.table_owner =3D c.table_owner and</FONT>
<BR><FONT SIZE=3D2>i.table_name =3D c.table_name and</FONT>
<BR><FONT SIZE=3D2>i.owner =3D c.index_owner</FONT>
<BR><FONT SIZE=3D2>order by non_unique, type, index_name, =
ordinal_position</FONT>
<BR><FONT SIZE=3D2>----</FONT>
<BR><FONT SIZE=3D2>Matt Adams - GE Appliances - =
matt.adams_at_appl.ge.com</FONT>
<BR><FONT SIZE=3D2>Their fundamental design flaws are completely</FONT>
<BR><FONT SIZE=3D2>hidden by their superficial design flaws.</FONT>
<BR><FONT =
SIZE=3D2> - =
Douglas Adams </FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Alexander.Feinstein_at_mitchell1.com</FONT>
<BR><FONT SIZE=3D2>[<A =
HREF=3D"mailto:Alexander.Feinstein_at_mitchell1.com">mailto:Alexander.Feins=
tein_at_mitchell1.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Friday, September 27, 2002 4:28 PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: RE: extremely long parse time</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Matt,</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2>Is it Oracle 9?</FONT>
<BR><FONT SIZE=3D2>If yes, time is in microseconds.</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2>Alex.</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Adams, Matthew (GEA, MABG, 088130) [<A =
HREF=3D"mailto:MATT.ADAMS_at_APPL.GE.COM">mailto:MATT.ADAMS_at_APPL.GE.COM</A>=
]</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, September 26, 2002 10:30 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: extremely long parse time</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>why would a query take 148 seconds to </FONT>
<BR><FONT SIZE=3D2>parse? It is a two way union </FONT>
<BR><FONT SIZE=3D2>where the first half is going against all_tables =
</FONT>
<BR><FONT SIZE=3D2>and the second half is a join </FONT>
<BR><FONT SIZE=3D2>between all_indexes and all_ind_columns. </FONT>
<BR><FONT SIZE=3D2>The shared pool has 50M large parts of it are =
</FONT>
<BR><FONT SIZE=3D2>free. I generated a 10046 (level 12) trace, =
and I just </FONT>
<BR><FONT SIZE=3D2>don't see anything out of whack, except of the =
</FONT>
<BR><FONT SIZE=3D2>c=3D14868 in the PARSE #1 line. </FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C2689F.0E9DCB8A--
------=_NextPartTM-000-cc91d5e3-4a70-4151-beb2-e8c29776a183--
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Adams, Matthew (GEA, MABG, 088130) INET: MATT.ADAMS_at_APPL.GE.COM Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- 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).Received on Mon Sep 30 2002 - 12:38:29 CDT
![]() |
![]() |