I have a MySQL query where in the age is to checked against an array of possible-possible-values.
The query looks like :
select * from users where age in (15,18,20,22);
Some times, the ages-array might only have a single value, say [22].
In such circumstances, am wondering if the following query (A):
select * from users where age in (22);
will be optimum when compared to (B):
select * from users where age = 22;
Please, let me know your thoughts.