Corrected performance issue in groupings fetching