And two query plans:
optimizer's choice between Good and Bad query plans depends on the values of const2A and const2B.
Note that both query plans use the same index, but the Good plan uses more key
parts. The point is that Good plan should always be used, because it scans a
proper subset of rows that the Bad plan is scanning.