Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Hi there I was just wondering what would be the difference between these 2 METHOD_OPT parameter settings:

FOR COLUMNS SIZE 5 some_column

and

FOR COLUMNS some_column SIZE 5

both will create a histogram with 5 buckets for the column 'some_column' right?

The official Oracle reference states that METHOD_OPT should have this form:

FOR COLUMNS [size clause] column|attribute [size_clause] [,column|attribute [size_clause]...]

but this doesn't really help my case.

I've seen sources which use both versions so not sure if there is any difference.

EDIT

I was told that both of these are the exact same, but then what about these 2:

FOR COLUMNS SIZE 5 some_column SIZE 6 some_column2

and

FOR COLUMNS some_column SIZE 5 some_column2 SIZE 6
share|improve this question

migrated from stackoverflow.com Jan 3 '12 at 13:06

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Looking at the syntax I would expect that COLUMS size_clause is a global setting, that can be overridden by specific size_clause for a single column. So in case of FOR COLUMNS SIZE 5 col1 SIZE 6, col2 means SIZE 6 takes precedence for col1, but col2 falls back to the default SIZE 5. This is what I would certainly expect, but I haven't verified this experimentally.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.