Prioritise queries.
Merge bug26174