Arrgggg...

So anyway, I am thinking, hey it's high time I start using DBMS_STATS
instead of my own procedure so I kick of the following (Oracle 8.1.7.4).
After the first run I have SYS and SYSTEM stats on indexes and on other
schemas with NO STATS it just ignored those tables even though you can see I
have GATHER EMPTY below.  So I kick it off again and guess what, it starts
analyzing the tables it missed the first time, including SYS and SYSTEM.
Guess I am going to use DBMS_STATS.GATHER_TABLE_STATS and be a bit more
specific about what I get.

define estimate_percent=5

declare

begin

   -- Can easily change to gather_schema_stats (make sure you add schema
name)
   dbms_stats.gather_database_stats(
      &estimate_percent,FALSE,'FOR ALL COLUMNS SIZE 1',
      NULL,'DEFAULT',TRUE,NULL,NULL,'GATHER EMPTY');

   dbms_stats.gather_database_stats(
      &estimate_percent,FALSE,'FOR ALL COLUMNS SIZE 1',
      NULL,'DEFAULT',TRUE,NULL,NULL,'GATHER STALE');

exception
   when others then
      dbms_output.put_line(dbms_utility.format_error_stack);
end;

Ethan Post
perotdba (AIM), epost1 (Yahoo)
--------------------------------------------------------------------


-----Original Message-----
Sent: Friday, October 04, 2002 3:56 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
indexes?
Importance: High


I seem to recall this is a bug.  You may want to check MetaLink.

In any case, you don't want to analyze SYS on any version
of Oracle.  ( yet )

Don't see what harm in having stats on SYSTEM tables though.

It's just a DBA account.

Jared





"Post, Ethan" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
 10/04/2002 02:23 PM
 Please respond to ORACLE-L

 
        To:     Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
        cc: 
        Subject:        DBMS_STATS.GATHER_DATABASE_STATS analyzes SYS and
SYSTEM indexes?


Looks like this is the case, does it know something I don't know?  Are 
indexes OK to analyze in the SYS and SYSTEM schemas?  Looks like is 
correctly does not do tables.
 
- Ethan

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Post, Ethan
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to