Creating tables in aster very slow using hash table and join

145 views Asked by At

I am doing a simple join on two tables in SQL which works fine, but when try to create a table using the same join it runs very slowly/never completes execution.

create table trial distribute by hash(key1) as
    select a.*,b.item2 from table1 a
    left join table2 b
    on a.key2=b.key2;

I gather the issue is that I am distributing on key1 but joining on key2 however I am not sure what the solution is.

0

There are 0 answers