我试图优化此连接,因为两个表都很大(#rows,#records):
Update Table1 as T1
Inner Join Table2 as T2
On T1.X=T2.Y
Set T1.A=T2.B;
结束了性能提升:
Update Table1 as T1
Inner Join (Select T2.Y,T2.B from Table2) as T2
On T1.X=T2.Y
Set T1.A=T2.B;
因此我想对Table1做同样的事情。然而,当我尝试:
Update (Select T1.X, T1.A from Table1) as T1
Inner Join (Select T2.Y,T2.B from Table2 )as T2
On T1.X=T2.Y
Set T1.A=T2.B;
我收到T1无法更新的错误。我怎么知道限制Table1加载的字段?