Can PE post results as they occur?

gbritton 2016-09-19 14:46:57

While running a long, complicated query (Actual plan), I notice that PE does not update the actual stats as the query runs. Can this be enabled? The idea is to be able to monitory progress through the query and to see where it is at.

Aaron Bertrand 2016-09-19 14:50:29
Did you try using live query profile? This will show data flowing between operators, and each operator will indicate % of estimates processed at least. If your estimates are way off, then it's harder for us to know what % is complete until the query is finished (if you estimate 1,000 rows and we reach 1,001, we don't know yet if we'll see 1,002, 10,002, or 6 billion – but we continue updating the % of processed vs. estimate).
gbritton 2016-09-19 15:00:54
I thought that was limited to SQL Server 2014 and up? I'm running 2012. Maybe this should be a feature request. The idea is to show in the results window the progress so far. Like actual rows and which part of the query is currently being executed.
Aaron Bertrand 2016-09-19 15:03:41
You're right, it is, I didn't know you were using 2012. We get the data processed from a DMV that was added in SQL Server 2014 SP1. I don't know if there's a simple way for us to know how many rows have been processed without that DMV.
gbritton 2016-09-19 15:16:39
So when I'm running a long query, I see the actual rows increasing. Is that a guestimate?
Aaron Bertrand 2016-09-19 15:18:39
When you're running a long query where, and where do you see actual rows increasing? Are you talking about in SSMS? You may be seeing the number of rows in the status bar, which indicates how many rows have been rendered in the grid in SSMS (which is totally different than number of rows processed by the server).
gbritton 2016-09-19 15:27:18
That is, in the bottom right corner of PE, where it shows time and actual rows
Aaron Bertrand 2016-09-19 15:30:10
I think you'll only see that number change when a statement has completely finished executing (so it may change multiple times during a batch, but not during an individual query; and we have no idea at that time what % of actual rows that will be of the overall batch, so there's no reliable way to show any meaningful progress).
gbritton 2016-09-19 15:05:05
too bad. Is there a way for you to see what statement is being processed at the moment to indicate overall progress through the query?
Aaron Bertrand 2016-09-19 15:20:27
No, I think there is some intentional synchronization at the end of the batch simply so we can do things like accurately show relative costs between statements in the batch.