Apache 在select查询中使用配置单元bucketing

Apache 在select查询中使用配置单元bucketing,apache,hadoop,hive,bigdata,Apache,Hadoop,Hive,Bigdata,我有一个基于userId的配置单元表,我的select查询在where子句中包含userId,但配置单元正在进行全表扫描蜂巢。强制执行。扣带为真 在这种情况下,为什么hive不利用bucketing,是否有任何配置来启用它 表结构 选择查询 select cell from <table> where userId=<userId> 选择userId所在的单元格= 从表中选择单元格示例(userId上的20个BUCKET)usertable,其中userId= +1个有

我有一个基于userId的配置单元表,我的select查询在where子句中包含userId,但配置单元正在进行全表扫描<代码>蜂巢。强制执行。扣带为真 在这种情况下,为什么hive不利用bucketing,是否有任何配置来启用它

表结构

选择查询

select cell from <table> where userId=<userId>
选择userId所在的单元格=
从表中选择单元格示例(userId上的20个BUCKET)usertable,其中userId=

+1个有趣的答案!但我不明白这有什么用处:您需要确切地知道每个bucket的内容,并指定不同的名称。你能举个例子说明这一点有用吗?
select cell from <table> where userId=<userId>
select cell from <table> TABLESAMPLE(BUCKET <n> OUT OF 20 ON userId) usertable where userId = <userId>