November 8, 2011 at 12:52 pm
edit: Aggregate Query Performance Statistics
Is there an easy way to do something like this
begin collection
end collection
print collection statistics
Something a long those lines? I have a deterministic cursor and I want to run it against a large list and have an easy way to aggregate the resulting cpu/io/etc costs for the section of code.
If this can't be done, what's the next best way?
Thanks 🙂
November 8, 2011 at 1:53 pm
ideally, you just use a CTE to put the data together, and then summarize it.
show us the cursor and the expected output, maybe we can switch it to set based logic instead.
with MyCTE
AS
(
SELECT stuff FROM WhatUsedToBeACursor
UNION ALL
SELECT otherstuff FROM WhatUsedToBeACursor
)
SELECT SUM(stuff) FROM MyCTE
Lowell
November 8, 2011 at 2:55 pm
Sorry, I had one of my typical moments when typing that up.
I meant query performance statistics
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply