Solved

Oracle 9i Histogram Help

Posted on 2004-09-10
7
1,102 Views
Last Modified: 2008-01-09
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
Comment
Question by:DonFreeman
  • 3
  • 3
7 Comments
 
LVL 1

Author Comment

by:DonFreeman
Comment Utility
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
 
LVL 13

Expert Comment

by:riazpk
Comment Utility
0
 
LVL 1

Author Comment

by:DonFreeman
Comment Utility
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:mottor
Comment Utility
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
 
LVL 1

Author Comment

by:DonFreeman
Comment Utility
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
 
LVL 4

Accepted Solution

by:
mottor earned 125 total points
Comment Utility
use DBMS_STATS.ALTER_SCHEMA_TAB_MONITORING
not DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING
0
 
LVL 4

Expert Comment

by:mottor
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now