Aggregate optimization was introduced in ASE 11.9.x. This allows the optimizer to factor in an index on the column referenced in an aggregate function. Sometimes the optimizer can be overly optimistic in costing this index and may choose it when it is not the best choice. If you notice poor performance because of this (showplan will show the index on the aggregate column being used), you can turn off aggregate optimization with trace flag 370, which will revert the server to a pre-11.9.x handling of aggregates by the optimizer.