业务场景:在大数据量的情况下,下面的SQL语句效率低下:
Select * from sa where sa.goodsid not in(select goods.goodsid from goods)
要求一:请对上述语句进行优化
要求二:请阐述对于SQL语句,你是如何判断其性能的,并说明在出现性能问题的原因
------解决方案--------------------
Select * from sa where not exists (select 1 from goods where goods.goodsid = sa.goodsid )