Reputation: 5596
I am starting to look at the query optimizer in SQL server 2008 and I’m particularly interested in the statistics profile that can be shown for a query. So far i understand that the result shown for the statistics profile is based on the statistics stored in SQL server and not the results from executing the query (e.g., the ‘Rows
’ column), right?
Now, is there a way to get the result from the statistics profile without executing the actual query at the same time?
Upvotes: 3
Views: 560
Reputation: 453278
SET STATISTICS_PROFILE ON
returns both actual and estimated row counts.
If you want just estimated row counts without running the query use SET SHOWPLAN_ALL ON
or SET SHOWPLAN_XML ON
Upvotes: 2