I have a table
vanrust_corev2.tblPlayerLog that has approx 6.7k records,
I also have a table in a different database
vanrust_forum.tblPlayerAvatars which has approx 6.7k records.
The purpose of this script is to pull the
SteamID of players who don't have an avatar stored for them yet. However the issue here is, the execution time of this script is often 29-31 seconds which seemed a little strange to me as I'm sure there are much more sophisticated and larger databases that would not have this issue.
SELECT * FROM vanrust_corev2.tblPlayerLog log WHERE not exists( SELECT a.SteamID FROM vanrust_forum.tblPlayerAvatars a WHERE a.Steamid = log.SteamID)
This is for the same user, just to a different database.
This script works perfectly the only issue here is execution time so I'm hoping for some pointers on where I could be going wrong.
Here is the execution plan: