Make queries deterministic