- Thanks received
- 1,182
9 times out of 10? Unnecessary table scans??!!!
I weep for you both. Amateurs.
If you say so. You's the daddy.
9 times out of 10? Unnecessary table scans??!!!
I weep for you both. Amateurs.
SP, if anyone else disagrees with me, can you please ban them?
![]()
Don't need to. 9 times out of 10 a join on two columns with appropriate indexes will generate a better execution plan than using IN, which ends up using a hash/match algorithm.
Possibly. depends if the indexes are used or not. Exists might work better. Who knows? Only can tell when you see the execution plan. For inner joins I agree the indexes will speed things along, I'm not certain a left outer join where the right side is filtered to be empty will be faster than a Exists. Then, if he's using mySQL the Left join AFAIK does something unlike a left outer join.
chaps,
Performance isn't a problem unless it's a problem.
anyway, I quite fancy
SELECT customerid FROM customer
MINUS
SELECT customerid FROM order;
you're inventing your own nonfunctional requirements there.
When you go down the shops, do you always drive a 54-seater coach because you could "potentially" meet 53 mates wanting a lift along the way?