473,666 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing Estimated Query Execution Plan (QEP) statisitics

Hi,

I have a question about estimated query execution plans that are
generated in QA of MSSQL.

If I point at an icon/physical operator in the estimated QEP, it shows
me
some statistics about the operator.
Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?

Also, is there a way to generate these statistics on my own?

thanks in advance

-TC.
Jul 20 '05 #1
2 2181
T Chaudhary (re**********@y ahoo.com) writes:
I have a question about estimated query execution plans that are
generated in QA of MSSQL.

If I point at an icon/physical operator in the estimated QEP, it shows
me
some statistics about the operator.
Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
Yes. It's all done through SQL statements. Rather than saying the exact
statements to use(*), I will tell you how find out: Use the SQL Server
Profiler to see what commands that Query Analyzer submits to SQL Server
when you have enabled these options.

(*) Since to tell which they are, *I* would have to run Profiler.
Also, is there a way to generate these statistics on my own?


I'm not sure that I understand the questions, but if I'm guessing right
the answer is: no, you can't.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
"T Chaudhary" :
Hi,

I have a question about estimated query execution plans that are
generated in QA of MSSQL.

If I point at an icon/physical operator in the estimated QEP, it shows
me
some statistics about the operator.
Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?

Also, is there a way to generate these statistics on my own?

thanks in advance

-TC.


TC,

See SET SHOWPLAN_ALL IN BOL for getting the data you're asking about. To
get the results of your query *and* the plan, see SET STATISTICS PROFILE.

Craig

P.S. Playing with these for a while will give you some real appreciation for
QA! :)
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4509
by: Mahesh Hardikar | last post by:
Hi , Oracle 8.1.7.0.0 on HP-UX 11.0 I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL T-SQL background. We have a report which uses a select statement . This select statement joins 15 tables . SOme of the tables are outer joined. It runs much slow when parameters (From & To Date) are for a month.
6
3279
by: Muharram Mansoorizadeh | last post by:
Hi there, I've a table with 18 millions of recordes shaped like this : Code nvarchar(80) , State int , school int , class int , Term nvarchar(80) The following query takes too long to run ( more than 2 hours ) select State , school , class , term , count (term) as freq Group by state , school , class , term How may I speed up the query? My Pc is PIV (3.6 GHz) Intell , Win2003 Server , 512 MB of RAM, 80 GB of HD Regards,
3
5363
by: Will Atkinson | last post by:
Hi All, I'm a relative newbie to SQL Server, so please forgive me if this is a daft question... When I set "Show Execution Plan" on in Query Analyzer, and execute a (fairly complex) sproc, I note that a particular query is reported as having a query cost of "71% relative to the batch" - however, this is nowhere near the slowest executing query in the batch - other queries which take over twice as long are reported as having costs in...
7
3623
by: Thomi Baechler | last post by:
Hello Everybody I run the following query against to identical databases. Execution time on the first DB is 0 seconds, on the other 6 seconds! SELECT dbo.HRMABZ.EMPKEY , dbo.HRMABZ.CONNUMB , dbo.HRM_CALENDER.Datum, dbo.HRMABZ.ABZTXT FROM dbo.HRM_CALENDER INNER JOIN dbo.HRMABZ ON dbo.HRM_CALENDER.Datum >= dbo.HRMABZ.ABZDATF
6
4550
by: Ryan | last post by:
I came across a situation that I've been unable to explain and was hoping somebody had an answer: I had written an update query which was taking about 8 seconds to run and considered it too slow. I copied the SQL statement from the query and tried executing it from code which then ran in 1 second. To make sure that I didn't miss anything, I copied the SQL statement back into a query and tried running it again. It now also only took 1...
2
3730
by: Ina Schmitz | last post by:
Hi NG, does IBM Universal Database 8.2 make any difference between actual and estimated execution plans like in SQL Server ("set showplan_all on" for estimated execution plan and "set statistics profile on" for actual execution plan)? Does "explain plan selection for" generate the *estimated* execution plan? Didn't find any distinction of actual or estimated execution plans in the information center. Thanks for help,
4
7728
by: cbrichards via SQLMonster.com | last post by:
I have a stored procedure that will execute with less than 1,000 reads one time (with a specified set of parameters), then with a different set of parameters the procedure executes with close to 500,000 reads (according to Profiler). In comparing the execution plans, they are the same, except for the actual and estimated number of rows. When the proc runs with parameters that produce reads that are less than 1,000 the actual and...
5
10746
by: sqlgirl | last post by:
Hi, We are trying to solve a real puzzle. We have a stored procedure that exhibits *drastically* different execution times depending on how its executed. When run from QA, it can take as little as 3 seconds. When it is called from an Excel vba application, it can take up to 180 seconds. Although, at other times, it can take as little as 20 seconds from Excel.
2
5530
by: uwcssa | last post by:
is there a way to see the actual (not just estimated) cost and cardinality at each plan operator? SQL Server and Oracle has such feature but I failed to find a way in DB2 yet (up to V9.5)
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.