我试图执行以下查询,并且在处理约1.5小时后中止会被中止:
create volatile table test2 as
(
select
a.*,
b.client_dk
from test1 as a
inner join payroll_clients as b
on a.payroll_agrmnt_id = b.lbt_lst_payroll_agrmnt_id
)
WITH DATA
ON
COMMIT PRESERVE ROWS;
表test1
包含~1500行,payroll_agrmnt_id
为unique
。
表payroll_clients
包含~151 mln 行(是的),client_dk
是唯一的
我做错了什么?
p.s。:已添加"显示表格"对于两个表:
show table payroll_clients;
CREATE SET VOLATILE TABLE "PAVLENKO-GA".payroll_clients ,NO FALLBACK ,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO,
LOG
(
client_dk BIGINT,
lbt_lst_payroll_agrmnt_id BIGINT)
PRIMARY INDEX ( client_dk ,lbt_lst_payroll_agrmnt_id )
ON COMMIT PRESERVE ROWS;
show table test1;
CREATE SET VOLATILE TABLE "PAVLENKO-GA".test1 ,NO FALLBACK ,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO,
LOG
(
INN FLOAT,
DOG_NUM FLOAT,
payroll_agrmnt_id BIGINT)
PRIMARY INDEX ( payroll_agrmnt_id )
ON COMMIT PRESERVE ROWS;
答案 0 :(得分:0)
解决方案由@dnoeth提供 - 应为目标表定义主索引。 THX