1. I think it would be better to check all users first and then check the order table information based on users, except of course if the order is smaller than the number of users.
2. When checking orders first and then users, users who have already checked do not need to check again
3. If it is a cross-database join on the same machine, you can use [database name].[table name] to join cross-database, pay attention to the permissions.
4. If they are on different machines, you can link the remote tables through the federated engine.
1. I think it would be better to check all users first and then check the order table information based on users, except of course if the order is smaller than the number of users.
2. When checking orders first and then users, users who have already checked do not need to check again
3. If it is a cross-database join on the same machine, you can use [database name].[table name] to join cross-database, pay attention to the permissions.
4. If they are on different machines, you can link the remote tables through the federated engine.