Simplify fetching and keying (and logging) queries