Gurus,
I'm trying to get an application finished that works like Query Analizer in
terms of returning query plans and statistics.
Problem the co-author is having:
>In using ADO to connect to SQL Server, I'm trying to retrieve multiple
>datasets AND statistics that are usually returned via the OnInfoMessage
>event. For those that are familiar with SQL Server, I need the results
>returned by the SET STATISTICS IO ON and SET STATISTICS PROFILE ON options.
>Anyone had any luck doing this before?
Can anyone shed any light on this please?
Thanks.
BTW if anyone wants to take a look at the tool so far - to see what I'm
delving into:
http://81.130.213.94/myforum/forum_posts.asp?TID=78&PN=1
Much Appreciated!!How about Object Browser pane? This one comes handy very often, you know?|||I'm not sure what you mean by Object Browser Pane - unless you mean something in Microsoft Query analizer...??
The problem I have is that this is a new tool that doesn't have any panes..just pains...arghhh.
Thanks for the help though!|||Here's some more info from the original post
http://81.130.213.94/myforum/forum_posts.asp?TID=26&PN=1
SET STATISTICS IO ON
SELECT 1 FROM sometable
IO statistics are returned as messages in the 2nd (blank) recordset. Good.
SET STATISTICS PROFILE ON
SELECT 1 FROM sometable
Execution plan is returned in the 2nd recordset. Good.
SET STATISTICS IO ON
SET STATISTICS PROFILE ON
SELECT 1 FROM sometable
2 recordsets are returned, the 2nd containing the execution plan. But the
IO statistics are nowhere to be found. Help!
SET STATISTICS IO ON
SET STATISTICS PROFILE ON
SELECT 1 FROM sometable
PRINT 1
3 recordsets are returned. The 2nd one contains the execution plan, the
third is blank but contains '1' as a info message. The IO statistics are
nowhere to be found. Help!sql
Showing posts with label analizer. Show all posts
Showing posts with label analizer. Show all posts
Friday, March 23, 2012
Query Plans & Statistics
query plan
I ran a sql query plan on query analizer, I need to send to someone by
email.
How do I send a query plan?
Thanksyou can take a snapshot of the query using "Print Screen"
button of the keyboard and generating bmp file out of it.
note: you will have an option to zoom in and zoom out the
image of "graphical query plan". you will get this by
right clicking on the "execution plan" pane.
Or you can send the textual outupt of the "query plan" by
turning on the option "SHOWPLAN_ALL". And the generated
output can be saved in TEXT file.
Ex:
USE pubs
GO
SET SHOWPLAN_ALL ON
GO
SELECT au_id
FROM authors
WHERE au_id = '409-56-7008'
GO
- Vishal
>--Original Message--
>I ran a sql query plan on query analizer, I need to send
to someone by
>email.
>How do I send a query plan?
>Thanks
>
>.
>sql
email.
How do I send a query plan?
Thanksyou can take a snapshot of the query using "Print Screen"
button of the keyboard and generating bmp file out of it.
note: you will have an option to zoom in and zoom out the
image of "graphical query plan". you will get this by
right clicking on the "execution plan" pane.
Or you can send the textual outupt of the "query plan" by
turning on the option "SHOWPLAN_ALL". And the generated
output can be saved in TEXT file.
Ex:
USE pubs
GO
SET SHOWPLAN_ALL ON
GO
SELECT au_id
FROM authors
WHERE au_id = '409-56-7008'
GO
- Vishal
>--Original Message--
>I ran a sql query plan on query analizer, I need to send
to someone by
>email.
>How do I send a query plan?
>Thanks
>
>.
>sql
Subscribe to:
Posts (Atom)