4

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
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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