You are here: Re: Saving query plan « MsSQL Server « IT news, forums, messages
Re: Saving query plan

Posted by Erland Sommarskog on 09/14/05 00:34

(jim_geissman@countrywide.com) writes:
> I would like to save a query plan (estimated or actual)
> created in Query Analyzer -- paste it into a document,
> or simply print. It doesn't seem to be possible to
> select and copy the Execution Plan window, and printing
> it creates microscopic gibberish which is a waste of
> paper. Is it possible to do this?
>
> Set showplan_text is of limited help for the SP I'm
> looking at -- while analyzing the SP, it reads ahead
> and complains that a temp table created inside the SP
> doesn't exist (yet) and exits. Using Ctrl-K to capture
> the query plan allows the SP to complete, but saving the
> plan is the problem.

SET STATISTICS PROFILE ON is what you are looking for.

You can also use Profiler, and filter for the event
Performance:Execution Plan.

In SQL 2005 you can actually save the graphical plan (in XML format)
from Managment Studio, the replacement for Query Analyzer and Enterprise
Manager.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация