Control size of sorting collection with MAX_RECORDS_IN_RAM