对数据进行HASH运算,放在不同文件中,降低热块,提高查询速度。


例如:根据sname进行hash运算存入5个桶中。

create table bucket_table
(sid int, sname string, age int)
clustered by (sname) into 5 buckets;

 

hash值相同的数据放入同一个桶中。 

Hive_Hive的数据模型_桶表

 

相关文章: