Neudesic Interview Question

how to handle queries returning huge results?