• see what happens when you add a materialized view... this will be much quicker..

    create VIEW vx_agg WITH SCHEMABINDING

    as

    SELECT --( COUNT_big(*) * SUM(col1*col2) - ( SUM(col1) * SUM(col2)))/( COUNT_big(*)* SUM(col1*col1)-( SUM(col1)* SUM(col1))) AGG

    COUNT_big(*) cnt

    ,SUM(col1*col2) col1col2

    ,SUM(col1) col1

    ,SUM(col1*col1) col1sq

    ,SUM(col2) col2

    FROM dbo.test_table

    GO

    CREATE UNIQUE clustered INDEX IX_AGG ON vx_agg (cnt)

    SELECT ( COUNT(*) * SUM(col1*col2) - ( SUM(col1) * SUM(col2)))/( COUNT(*)* SUM(col1*col1)-( SUM(col1)* SUM(col1)))

    FROM dbo.test_table