I selected sorted input but the mapping takes the same amount of time as before.
You cannot use sorted input if either of the following conditions are true:
The aggregate expression contains nested aggregate functions.
Source data is data driven.
When either of these conditions are true, the Data Integration Service processes the transformation as if you do not use sorted input.
A mapping with an Aggregator transformation causes slow performance.
The Data Integration Service may be paging to disk. You can increase performance by increasing the index and data cache sizes in the transformation properties.