By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,575 Members | 1,968 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,575 IT Pros & Developers. It's quick & easy.

Single table condition in join or where

P: 2
Hi all,

It is possible that this question has already been answered before, but I've searched through the forums and couldn't really find a satisfactory answer to the following question:

What is the difference in terms of execution and performance of the following queries on SQL SERVER 2005.

1.
SELECT *
FROM A a
JOIN B b ON (a.id = b.id)
WHERE a.x > 10 AND b.y < 100


2.
SELECT *
FROM A a
JOIN B b ON (a.id = b.id AND a.x > 10 AND b.y < 100)

Consider the scenarios where the columns x,y have / do not have a non-clustered index.

Also it would be great if someone could answer the same question for SYBASE.

Thanks
Lars
Feb 11 '09 #1
Share this Question
Share on Google+
2 Replies


P: 2
ping! Is this very obvious?
Feb 24 '09 #2

ck9663
Expert 2.5K+
P: 2,878
Try checking the execution plan.

-- CK
Feb 24 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.