Chapter 8. Statistics in Hive

In previous chapters, you learned different types of joins in Hive and optimizations available in Hive joins.

In this chapter, we will cover the following recipes in detail:

  • Bringing statistics in to Hive
  • Table and partition statistics in Hive
  • Column statistics in Hive
  • Top K statistics in Hive

Bringing statistics in to Hive

Statistics in terms of the number of records in a table or partitions or histograms of a column is important. Also, it could help in query optimization. Statistical data is required as an input to many functions so that it can compare different plans. Statistics also help users by storing answers to some of the most frequently queried data and prevent long-running execution plans each time a query is ...

Get Apache Hive Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.