3.5.2版本的索引
主键表tb,创建主键t是primary key(col1,col2) ,distributed by hash(col1,col2) buckets 64 ,order by(col1)。
查询的时候 select * from tb where col1 in(1个值) ;执行计划显示 tabletRatio=64/64 ,这就很尴尬。
tb2表primary key(col2),distributed by hash(col2) buckets 64 ,order by(col2)。
select * from tb p
join tb2 c on p.col2=c.col2
where p.col1 in(1个值) ;
这个tb2表为什么也是全桶扫描?