Just as a small example:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.41-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET @qwe=5;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT BENCHMARK(100000000, @qwe IN (10,5));
+--------------------------------------+
| BENCHMARK(100000000, @qwe IN (10,5)) |
+--------------------------------------+
| 0 |
+--------------------------------------+
1 row in set (3.52 sec)
mysql> SELECT BENCHMARK(100000000, @qwe = 10 OR @qwe = 5);
+---------------------------------------------+
| BENCHMARK(100000000, @qwe = 10 OR @qwe = 5) |
+---------------------------------------------+
| 0 |
+---------------------------------------------+
1 row in set (5.91 sec)
And:
mysql> SELECT BENCHMARK(100000000, @qwe IN (10,1,9,2,8,3,7,4,6,5));
+------------------------------------------------------+
| BENCHMARK(100000000, @qwe IN (10,1,9,2,8,3,7,4,6,5)) |
+------------------------------------------------------+
| 0 |
+------------------------------------------------------+
1 row in set (6.02 sec)
mysql> SELECT BENCHMARK(100000000, @qwe = 10 OR @qwe = 1 OR @qwe = 9
-> OR @qwe = 2 OR @qwe = 8 OR @qwe = 3 OR @qwe = 7 OR @qwe = 4
-> OR @qwe = 6 OR @qwe = 5) as result;
+--------+
| result |
+--------+
| 0 |
+--------+
1 row in set (20.20 sec)
Mind the duration in parentheses.