BAQ Efficiency: Constant List or Multiple OR criteria

10.2.700.6

This a general question… I am selecting records that have a value of A, B or C in a certain field.

When specifying the table criteria is it more efficient to:

  1. Have three different OR lines

or

  1. Have one criterion where [field] is IN constant list (A, B, C)

The question is strictly from a BAQ execution perspective, not which is easier for the user to create.

My understanding is that, from a performance standpoint, they will be identical. The best way to tell for sure would be to create BAQ using both methods and then use the BAQ Actions menu to generate the SQL execution plan for each, which you can then compare in SQL.

I think that when you pull the execution plan for the BAQ using the IN operator, you will see that it is being changed to OR operators within the execution plan anyways (but please test this and don’t just take my word for it, since it has been a while since I have tested this).