Optimize users fetch query