How to write efficient query with large collections?

@Pradyumna_Mishra

Please: