queries database in sets of 100 collections for perforamce optimization