Showing posts with label plan. Show all posts
Showing posts with label plan. Show all posts

Sunday, March 25, 2012

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.T Chaudhary (replysoon_04@.yahoo.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, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"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! :)

Accessing DB from Webpages or Visual Studio

Ok,

I am a webdesigner who at the moment does not know SQL (although, I plan on remedying that) so I am developing a page with a DB designer - he is doing the DB work, I am doing the look/feel, but he asked me the following questions, of which I cannot seem to find an answer and the guys who tend our server are useless - so I am hoping someone here can help me. In general what he needs to know is:

"what is the external address (either in domain format or IP) and the equivalent internal address so that we can access the msSQL running on your server. The internal address is needed for the webpages to talk to it, while the external address is needed for development of the pages in visual studio and the database tools." Also, he later sent me an email asking that when I get this info (from someone) that it would be usefull to get a sample string/query to get access to the DB. I am running SQL 2000 and have enterprise manager. Where can I find this information? or how do I figure this out?

Thank you for all the help -- Please let me know if you need any more info.

Hey everybody,

I am a webdesigner who currently does not know SQL (although I am working on Remedying that) So as for my question, it comes from the gentleman who I am working with on a new site. What he needs to know is:

"what is the external address (either in domain format or IP) and the equivalent internal address so that we can access the msSQL running on your server. The internal address is needed for the webpages to talk to it, while the external address is needed for development of the pages in visual studio and the database tools."

We are running SQL 2000 with Enterprise manager. On an IIS server. He would also like to get a sample string {? = Query?} for a page accessing the DB.

Any help about where to find this information would be greatly appreciated. If you need to know anything else. Please let me know...

|||http://www.connectionstrings.com/?carrier=sqlserver2005|||There is no internal and external address. I am not quite sure what you mean by that. There is also no querystring in IIS to access the db, you will have to code that for yourself. You can use any coding language and a connectionstring from www.connectionstrings.com. Hars to tell what he wants to know with this information so far.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

The 'internal' address will be the ServerName. The 'external' address will be the port and IP address -that assumes that your firewall allows that port to be open. (I suggest using something other than the default port of 1433 -choose a high number port to use.)

As Jens suggested, the web application should use the correct connectionstring. Hopefully, you will NOT allow something as reckless and dangerous as using a =?Query to pass connection information or sensitive data.