Optimised entity queries