Sunday, February 12, 2012

Accessing Query Execution Plan (QEP) Statistics

Hi,
I have some questions about estimated QEPs that can be generated in MSSQL QA.
If I point at an icon/physical operator in the estimated QEP, it shows me
some statistics about the operator.
1. Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
2. Are these statistics generated at the server or at the client?
3. Also, is there a way to generate these statistics on my own?
Thanks in advance,
-TC.T Chaudhary wrote:
> Hi,
> I have some questions about estimated QEPs that can be generated in
> MSSQL QA.
> If I point at an icon/physical operator in the estimated QEP, it
> shows me some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e.,
> can these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Generated on the server. You can use SET SHOWPLAN_ALL ON from QA to get
results back in result set format.
Try This:
Set showplan_all on
go
select * from pubs..publishers
go
Set showplan_all off
go
David G.|||If you are also interested in index statistics try
DBCC show_statistics(object_id, indid)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"T Chaudhary" <replysoon_04@.yahoo.com> wrote in message
news:e8149671.0409091256.56631cf@.posting.google.com...
> Hi,
> I have some questions about estimated QEPs that can be generated in MSSQL
QA.
> If I point at an icon/physical operator in the estimated QEP, it shows me
> some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e., can
> these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.

No comments:

Post a Comment