表 A 表 B
Select a.* From A a Where a.bid not in (Select b.id From B b)
优化之后
Select a.id From A a Left Join B b on b.id=a.bid
where b.id is null
表 A 表 B
Select a.* From A a Where a.bid not in (Select b.id From B b)
优化之后
Select a.id From A a Left Join B b on b.id=a.bid
where b.id is null