Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Monitoring automatic analysis of stale tables

Re: Monitoring automatic analysis of stale tables

From: Rick Denoire <100.17706_at_germanynet.de>
Date: Sun, 06 Apr 2003 19:55:39 +0200
Message-ID: <geo09v0ahskfappn5m65fjsfdj4n3ckiuq@4ax.com>


OK, I found that using the same
DBMS_STATS.GATHER_SCHEMA_STATS
procedure for empty and stale tables will not only calculate statistics, but also returns the name of the objects analyzed. I just can't handle the syntax, I suppose this is a trivial question for you:

Take a look at this:

DBMS_STATS.GATHER_SCHEMA_STATS (
ownname VARCHAR2,
estimate_percent NUMBER DEFAULT NULL,

block_sample     BOOLEAN  DEFAULT FALSE,
method_opt       VARCHAR2 DEFAULT 'FOR ALL COLUMNS SIZE 1',
degree           NUMBER   DEFAULT NULL,
granularity      VARCHAR2 DEFAULT 'DEFAULT', 
cascade          BOOLEAN  DEFAULT FALSE,
stattab          VARCHAR2 DEFAULT NULL, 
statid           VARCHAR2 DEFAULT NULL,
options          VARCHAR2 DEFAULT 'GATHER', 
objlist     OUT  ObjectTab,
statown          VARCHAR2 DEFAULT NULL);

So I use:
dbms_stats.gather_schema_stats(ownname->"SCOTT",options->"GATHER STALE")
I must admit that I am a little bit helpless at this point. I have no clue about how to output the names of the analyzed tables supposedly contained in objlist (this is more a question about how to deal with DBMS packages returning values, sorry for my ignorance).

I would still appreciate your help - I am still learning.

Bye
Rick Denoire Received on Sun Apr 06 2003 - 12:55:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US