Sort records on batch inserts.