A query containing the condition (field != 1 or field !=2), which always evaluates to TRUE, was found to run very slowly. The OR optimizer tried to optimize the useless OR causing a non-optimal execution plan. The logic has been modified to correct this.