Aggregate optimization