Create table orders_bucket( trans_id int, acc_num int, trans_time date, trans_type string, stock_id string, price decimal, amount int) clustered by (trans_id) stored as holodesk;
复制
-
每条数据的 trans_id 都不同,trans_id 作为分桶键可以更均为的切分数据。
-
当 trans_id 作为 join列 时,可以通过 bucket join 加速查询,具体请参考《Tranwarp ArgoDB 优化指南》。