Solved

Stats With Histogram

Posted on 2014-10-08
5
599 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 77

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 77

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

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!

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

718 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