• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1117
  • Last Modified:

Oracle 9i Histogram Help

I am trying to implement histograms and have been following Burleson's method of implementing.  I'm on Oracle 9i Rel 2 Ver 9.2.0.5 on Windows 2000 Advanced Server. I have run :

begin
   dbms_stats.gather_schema_stats(
      ownname          => 'SNAP',
      estimate_percent => dbms_stats.auto_sample_size,
      method_opt       => 'for all columns size skewonly',
      degree           => 4
   );
end;
/

And am trying to interpret what I am seeing in DBA_histograms.  I am the first one to run histograms on this db and there are only about 300 tables in this schema with about 15 columns or so per table.  I am ending up with a lot of rows in this table.  I wasn't expecting that.  I am expecting one row per histogram and one histogram per column.   Is that right?  Can histograms be deleted?  Using delete schema stats didn't do it....


0
DonFreeman
Asked:
DonFreeman
  • 3
  • 3
1 Solution
 
DonFreemanAuthor Commented:
Here is what I got:

TEST1-DFREEMAN> select count(*) from dba_histograms;

                                          COUNT(*)
--------------------------------------------------
                                             76318

1 row selected.

TEST1-DFREEMAN> select count(*) from all_tab_columns where owner ='SNAP';

                                          COUNT(*)
--------------------------------------------------
                                              5345
0
 
riazpkCommented:
0
 
DonFreemanAuthor Commented:
I can't get this link to work.  I have been on AskTom quite a bit this morning researching this issue but I can't find a description of how the dba_histogram table works.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mottorCommented:
Oracle docs:
 Choosing the Number of Buckets for a Histogram
http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a87503/stats.htm#27027
0
 
DonFreemanAuthor Commented:
I'm struggling through this.  I'm trying to figure out exactly how to clear that histogram information out of dba_histograms.   I only have this database part-time and would like to return it to pre-histogram state.  I did it running skewonly method.  I tried to remove it using dbms_stats.delete_schema_stats.   The links aren't working for me guys.  I have links to 500 docs.  What I need is an unambiguous explanation of 'middle-level' of how this works.  

Also, I tried to turn on schema monitoring using:  NEDSSART-DFREEMAN> BEGIN
  2   DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING (
  3     ownname=>'SNAP',
  4     monitoring=>TRUE);
  5  END;
  6  /
 DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING (
            *
ERROR at line 2:
ORA-06550: line 2, column 13:
PLS-00302: component 'ALTER_SCHEMA_TABLE_MONITORING' must be declared
ORA-06550: line 2, column 2:
PL/SQL: Statement ignored
0
 
mottorCommented:
use DBMS_STATS.ALTER_SCHEMA_TAB_MONITORING
not DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING
0
 
mottorCommented:
Now,
There is another link:
http://asktom.oracle.com/pls/ask/f?p=4950:8:6965706299122648996::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:3126073805757,
It contains article (search fo 'Article'), which is unambiguous explanation of 'middle-level' .
And be sure you read the whole.

Regards.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now