|
-
Feb 25th, 2014, 08:49 AM
#11
Thread Starter
Fanatic Member
Re: Join versus Where Exists
Guys - thank you. The execution plan was fairly non-committal, probably because there's no actual data in the Agent table anymore (someone helpfully dropped and recreated it), but it did look as if the EXISTS would have a detrimental effect. Alternating between SELECT * and SELECT 1 didn't seem to make any difference at all.
I've elected to go with the CTE, and swap the DISTINCT for a GROUP BY as suggested by TG.
Thanks for your help, everyone - much appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|