More efficient setting of where clause