COLLECT [ SUMMARY ] { STATISTICS | STAT }
[ USING using_option [ AND using_option ][...] ]
[ [ UNIQUE ] INDEX index_specification | COLUMN column_specification ][...]
ON collection_source FROM from_option [;]
- using_option
{ SAMPLE | SYSTEM SAMPLE | SAMPLE n PERCENT | NO SAMPLE |
{ SYSTEM THRESHOLD | THRESHOLD n | NO THRESHOLD } [ PERCENT | DAYS ] |
MAXINTERVALS n |
SYSTEM MAXINTERVALS |
MAXVALUELENGTH n |
SYSTEM MAXVALUELENGTH
} [ FOR CURRENT ]
- index_specification
{ index_name |
[ index_name ] [ ALL ] ( column_name_1 [,...] )
[ ORDER BY { VALUES | HASH } ( column_name_2 ) ]
}
- column_specification
{ { expression |
column_name |
( { expression | column_name | PARTITION }[,...] )
} [ [AS] statistics_name ] |
PARTITION |
statistics_name
}
- collection_source
{ [ TEMPORARY ] [ database_name. | user_name. ] table_name_1 |
[ database_name. | user_name. ] { join_index_name | hash_index_name }
}
- from_option
{ [ TEMPORARY ] [ database_name. | user_name. ] table_name_2 |
[ database_name. | user_name. ] { join_index_name | hash_index_name }
} [ COLUMN {
{ column_name_3 | PARTITION } |
statistics_name |
( { column_name | PARTITION }[,...] )
}
]