select * from a where a.s_status=1 and exists (select orderid from b on a.orderid=b.orderid)
exists execution order
1. First exists returns true or false
2. When querying a piece of data of a, it will execute exists. If it returns true, it will exist in the result set, and then execute the next data of a until the data of a is executed.
3. How is the data in exists executed? As long as the conditions are met, it will return true, there is no need to query all the data in the b table