Solved

Stats With Histogram

Posted on 2014-10-08
5
573 Views
Last Modified: 2014-10-09
Trying to run schema stats and get histogram.
If i run :
DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'SYS', cascade=>TRUE,  method_opt=>'FOR ALL  COLUMNS SIZE 1');
it completes successfully.  If i change SIZE to 256

ORA-20000: Cannot parse for clause: FOR ALL COLUMNS SIZE 256 ORA-06512: at "SYS.DBMS_STATS", line 25335 ORA-06512: at "SYS.DBMS_STATS", line 25414 ORA-06512: at "SYS.DBMS_STATS", line 25367 ORA-06512: at line 3

How do i get stats with histogram for sys?
0
Comment
Question by:xoxomos
  • 3
  • 2
5 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40370451
256 doesn't appear to be valid.

http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS059

METHOD_OPT - The value controls column statistics collection and histogram creation. It accepts either of the following options, or both in combination:

size_clause is defined as size_clause := SIZE {integer | REPEAT | AUTO | SKEWONLY}

- integer : Number of histogram buckets. Must be in the range [1,254].
0
 

Author Comment

by:xoxomos
ID: 40371961
Right!  256 INDEED:-(
0
 

Author Closing Comment

by:xoxomos
ID: 40371962
Thanks again
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40372037
No problem.

Just remember:  The online docs are always your friend.
0
 

Author Comment

by:xoxomos
ID: 40372144
yes, i read the '.........between 1 and 25', then filled in 6 from a very old habit.
thanks again
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Require data to appear on a single line 2 69
Create Index on a Materialized View 5 32
capture vmstat info and insert it into an oracle table 31 34
date show only hh:mm 2 25
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

808 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