我的查询中有一个交叉连接。这是修改后的查询:
create table abc.abcd as with temp1 as
(select
1 as bid, *
from
abc.data_1 ), temp2 as (select
1 as aid, *
from
abc.data_2 b), temp3 as ( select
a.*,
b.*
from temp2 a
join
temp1 b on a.aid=b.bid)
select * from temp3
在redshift查询历史中查询成功完成但查询的状态还在sqlworkbench/J中运行。
在查询新创建的表时,我收到一个对象不存在的错误。我正在使用 4 节点 dc2.large 集群。这里可能出了什么问题?
更新 1:如果我正在运行相同的查询但使用限制子句,则查询返回输出就好了,并且正在创建表。
这是使用限制子句的查询:
create table abc.abcd as with temp1 as
(select
1 as bid, *
from
abc.data_1 ), temp2 as (select
1 as aid, *
from
abc.data_2 b), temp3 as ( select
a.*,
b.*
from temp2 a
join
temp1 b on a.aid=b.bid)
select * from temp3 limit 200