Viewing Statistics
Use the DESCRIBE statement to view statistics generated by CBO. Include the EXTENDED keyword if you
want to include statistics gathered when the hive.stats.fetch.column.stats
and
hive.compute.query.using.stats
properties are enabled.
Viewing Generated Table Statistics
Use the following syntax to generate table statistics:
DESCRIBE [EXTENDED] tablename;
Note The EXTENDED keyword can be used only if the
hive.stats.autogather
property is enabled in thehive-site.xml
configuration file.The following example displays all statistics for the employees table:
DESCRIBE EXTENDED employees;
Viewing Generated Column Statistics
Use the following syntax to generate column statistics:
DESCRIBE FORMATTED [dbname.]tablename.columnname;
The following example displays statistics for the region column in the employees table:
DESCRIBE FORMATTED employees.region;
Note | |
---|---|
See Statistics in Hive on the Apache website for more information. |