Skip to content

Instantly share code, notes, and snippets.

@hadoopsters
Created December 19, 2017 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadoopsters/216fb0716f2e1d8f52bca0bda722f354 to your computer and use it in GitHub Desktop.
Save hadoopsters/216fb0716f2e1d8f52bca0bda722f354 to your computer and use it in GitHub Desktop.
ANALYZE TABLE my_database.my_table compute statistics for column1, column2, column3; -- column stats for non-partitioned table
ANALYZE TABLE my_database.my_table PARTITION (YEAR=2017, MONTH=11, DAY=30, HOUR=0) compute statistics for column1, column2, column3; -- column stats for single hour of partitioned table
ANALYZE TABLE my_database.my_table PARTITION (YEAR=2017, MONTH=11, DAY=30, HOUR) compute statistics for column1, column2, column3; -- column stats for a single day of partitioned table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment