While assembling the WHERE clause for a Filter, judging by the tests, we are producing a list of (item = 'a') OR (item = 'b') rather than using the WHERE item IN (a,b) syntax.
Doing so would mean the query more closely resembles the filter and I think would mean the tests are more readable.
There might be a small benefit also in terms of saving bandwidth (presumably, that verbose query has to go over the wire to the DB). I understand that DB typically translates this into a list of OR clauses anyway, so it doesn't offer any performance advantage in that respect.
While assembling the
WHERE
clause for aFilter
, judging by the tests, we are producing a list of(item = 'a') OR (item = 'b')
rather than using theWHERE item IN (a,b)
syntax.Doing so would mean the query more closely resembles the filter and I think would mean the tests are more readable.
There might be a small benefit also in terms of saving bandwidth (presumably, that verbose query has to go over the wire to the DB). I understand that DB typically translates this into a list of OR clauses anyway, so it doesn't offer any performance advantage in that respect.