• You need to get rid of the massive GROUP BY; you should be able to do the SUM() in a subquery rather than the main query, but I can't be sure which columns come from which views/tables so I can't rewrite any part of the query now.

    Until then, at least GROUP BY the ORDER BY columns first, to reduce the sorting required to satisfy the query, viz:

    GROUP BY fldConsulNo, fldCCGroupCd, fldCCSortOrder,

    RC.fldCCCd, fldSubCCNo,

    fldCCGroupDesc,

    fldConsulName,

    tblConsul.fldConsulKey,

    fldCCDesc, fldSubCCName, v.fldCostCenterKey

    ORDER BY fldConsulNo, fldCCGroupCd, fldCCSortOrder, fldCCCd , fldSubCCNo

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".