Have a per-resource way to optimize mongo queries