Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: capitalize NOSCAN and add line break in ANALYZE syntax

...

Code Block
ANALYZE TABLE tablename [PARTITION(partcol1[=val1], partcol2[=val2], ...)]
  COMPUTE STATISTICS [noscanNOSCAN];

When the user issues that command, he may or may not specify the partition specs. If the user doesn't specify any partition specs, statistics are gathered for the table as well as all the partitions (if any). If certain partition specs are specified, then statistics are gathered for only those partitions. When computing statistics across all partitions, the partition columns still need to be listed.

When optional parameter noscan NOSCAN is specified, the command won't scan files so that it's supposed to be fast. Instead of all statistics, it just gathers the following statistics:

...

Code Block
ANALYZE TABLE Table1 PARTITION(ds='2008-04-09', hr) COMPUTE STATISTICS noscanNOSCAN;

then statistics, number of files and physical size in bytes , are gathered for partitions 3 and 4 only.

...