Performance
Readability
Instead of specifying an IN operator to filter on multiple values a UNION (ALL) query is created to scan the table for each filter value
SELECT *
FROM tablex
WHERE col1=3
UNION ALL
SELECT *
FROM tablex
WHERE col1=5;
SELECT *
FROM tablex
WHERE col1<3
UNION ALL
SELECT *
FROM tablex
WHERE col1>5;
Use the IN operator to filter on multiple values
SELECT *
FROM tablex
WHERE col1 IN(3
,5)
SELECT *
FROM tablex
WHERE col1<3
OR col1>5;
None