Confused about execution time

  • My initial query for a report returned 2.82 of data in 34509 rows and took 1:34. I removed some unneeded fields from the select and grouping statements and now it returns 1.22 mb in 16418 rows but still takes the same amount of time. Could some one please explain to me why the execution time did not decrease when I decreased the amount of data?

    Thanks

    Dean

  • Probably because most of the time is spent in martialing the rows of data, not particular columns.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks, but the number of rows was cut in half and there was no reduction in execution time. so I'm still confused:unsure:

  • Sorry, I didn't read the whole post (again).

    That is odd. Where are you measuring the time elapsed, the server or the client?

    Have you looked at the execution plan? Maybe most of the cost is in a single operation that hasn't changed despite the other changes to the query.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I'm just looking at the clock in the bottom right corner of the Management Studio window. I highlighted the select statement in my sproc and then clicked Execute

  • That's elapsed time on the client then. Have you looked at the execution plans?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply