# Using OR, or IN with NULL

**URL:** <https://forums.percona.com/t/using-or-or-in-with-null/4175>\
**Category:** Other MySQL® Questions\
**Created:** [April 22, 2015, 11:05am UTC](https://forums.percona.com/t/using-or-or-in-with-null/4175 "2015-04-22T11:05:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RPereira](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@RPereira](https://forums.percona.com/u/RPereira)\
**Post date:** [April 22, 2015, 11:05am UTC](https://forums.percona.com/t/using-or-or-in-with-null/4175/1 "2015-04-22T11:05:43Z")

</div>

Is there any benefit to using one of these over the other?

1. AND (r.resolve\_status = 0 OR ISNULL(r.resolve\_status))

2. AND r.resolve\_status IN(0,NULL)

I ran a query through an online “tuner” and the only recommendation was to use IN instead of OR. I can not find any documentation on this, but then again searching for variations of ‘using or or in’ may not have been the best approach.

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [April 23, 2015, 2:00pm UTC](https://forums.percona.com/t/using-or-or-in-with-null/4175/2 "2015-04-23T14:00:24Z")

</div>

Hi RPereira;

Generally speaking if you only have a couple values you are comparing, the two options will be similar performance wise. However if you have a larger list of values, then the IN tends to perform better. There is no easy way to say what that magic cutoff number is, but in most cases if you have 2-3 values, either way is fine. Any more than that and I would go with IN typically (though like most answers it will depend on the situation still).

-Scott
