Both queries are same. But Query 2
will give you better performance, as &&
will help you in short-circuit. In the first query, first where
will yield the result and that will be given to 2nd where
clause and then it will evaluate result based on the input. Let me know if you need more info.