Sunday, March 25, 2012

(Less Than) vs. (Less Than Or Equal To)

Assume ID is an Integer field, which is faster (or is there any difference at all)?

Code Snippet

select * from <MyTable> where ID < 51

--or

select * from <MyTable> where ID <=50

You should get the same perf. It's just a constant filter.

|||Thanks much. That's been my experience, but wanted to make sure I wasn't leaving some performance on the table.

No comments:

Post a Comment