Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g78Hx9P01055
 for <oracle-l@naude.co.za>; Thu, 8 Aug 2002 13:59:09 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id KAA32191;
 Thu, 8 Aug 2002 10:56:53 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b71/bab) via UUCP id 004AF7C4; Thu, 08 Aug 2002 10:48:34 -0800
Message-ID: <F001.004AF7C4.20020808104834@fatcity.com>
Date: Thu, 08 Aug 2002 10:48:34 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@espn.com>
Subject: Statistics - using dbms_stats breaks the query
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 71; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/mixed;	boundary="----=_NextPartTM-000-8331f2ac-aaed-11d6-a0dc-00508bbd2e09"
------=_NextPartTM-000-8331f2ac-aaed-11d6-a0dc-00508bbd2e09
Content-Type: text/plain;
 charset="iso-8859-1"

Okay ... here is the problem ...

We have our DB (8161) running in RULE mode. Due to some schema using
Context, we need to analyze a bunch of tables, but the table has optimizer
mode set to RULE.

We used to do 'exec dbms_utility.analyze_schema('<schema>,'COMPUTE');' for a
long time. Lately it doesn't finish, so I changed it to ESTIMATE. The
database and certain queries were okay, running within limits.

Then one day (my mistake), I changed the scripts to use dbms_stats to do the
analyze instead of dbms_utility.analyze_schema. This broke some of our
critical and large reports. These reports run in 20 mins, but after using
dbms_stats, it took the reports > 2.5 hours to finish.

I assume, dbms_utility.analyze_schema(), 'alter table analyze', and
dbms_stats are same and do the same thing. So, why do the reports work fine
when using the former 2 and a re dead slow when using dbms_stats ?? What is
so different in 'analyze table' and 'dbms_stats' ??

Any hints, ideas are gratefully accepted.

Thanks in advance
Raj
______________________________________________________
Rajendra Jamadagni		MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!


------=_NextPartTM-000-8331f2ac-aaed-11d6-a0dc-00508bbd2e09
Content-Type: text/plain;
 name="ESPN_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ESPN_Disclaimer.txt"


*********************************************************************2

This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.

*********************************************************************2


------=_NextPartTM-000-8331f2ac-aaed-11d6-a0dc-00508bbd2e09--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni@espn.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@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).

