Documentation forSQL Sentry

Plan Explorer Sessions

Introduction

Plan Explorer introduces the concept of a Plan Explorer Session and its associated Plan Explorer Session file (.pesession). Plan Explorer Session files are completely portable, and contain a record of the entire session, including versioning.

Plan ExplorerSessions are designed to help you manage a historical record as you refine queries. By default, a historical entry generates as part of the Plan ExplorerSession during Estimated and Actual Plan retrieval.

Note:  Change how Plan Explorer generates new historical entries through User Preferences (Tools > UserPreferences > Performance Analysis tab). The Only save history when command text or Instance settings change option controls this behavior.

Version History

Each historical entry retains all captured plan details and metrics within the various Plan Explorer tabs. Each version is associated with a unique version number. Plan Explorer includes a Plan History pane (View > Plan History) that allows you to navigate through the different versions within the active Plan Explorer Session.

SQL Sentry Plan Explorer View Plan History

To delete a version, select Delete in the History pane context menu.

SQL Sentry Plan Explorer Plan History pane

Note:  The Status bar, located at the bottom of the Plan Explorer window, updates as actions are taken, including each time a new historical version is loaded. 

Adding Comments

Plan Explorer allows you to add comments to each historical version (View > Comments). This allows you to keep track of the reasoning behind any changes you make, like changes to the Command Text or any indexing optimization.

SQL Sentry Plan Explorer Plan History pane

You can also add comments in the Plan History pane by selecting the Comments drop-down list.  

SQL Sentry Plan Explorer Plan History pane Comments

Multiple Sessions and Tabs

As each session is managed within its own tab, multiple Plan Explorer Sessions can be open at the same time. SQL Sentry Plan Explorer was designed with a multiple document interface, allowing you several options when managing tabbed sessions, including the ability to arrange tabs horizontally and vertically, and the ability to tear off tabs. Tab Windowing options are found in the Window menu.

Sharing Session Files

Plan Explorer Session files are easily shared with others, even if they don't have access to the full SQL Sentry client.

SQL Sentry Plan Explorer is a stand-alone query analysis tool. Plan Explorer uses session files to manage history, just like the integrated Plan Explorer, and contains complete support for opening Plan ExplorerSession files generated in the SQL Sentry client.

Plan Explorer also opens session files in a limited fashion. When you open a Plan ExplorerSession file (.pesession) for the first time in Plan Explorer, it'll by default open the first history entry. If you've opened the session file previously, it'll open the last history item you were viewing. You can easily switch between history items using View > PlanHistory

This is possible because each historical entry in a Plan Explorer Session is actually a .queryanalysis file. Plan Explorer Session files are archive files, containing the individual .queryanalysis files and metadata about the session.

Note:  Save any single historical entry of a Plan Explorer Session as a stand-alone .queryanalysis file. With the entry you wish to save as active, select Save As (File > Save as), and then choose the desired file type.

Starting a New Session

Start a new Plan Explorer Session by completing any of the following:

Option Image
Select File > New SQL Sentry Plan Explorer select File > New
Select Toolbar > New Plan Explorer Session icon, or drag-and-drop a plan file onto the application. SQL Sentry Plan Explorer select New Plan Explorer Session button

Saving a Session

Save a Plan Explorer Session by completing either of the following:

Option Image
Select File > Save / Save As
SQL Sentry Plan Explorer Save options
Select Toolbar > Save icon
SQL Sentry Plan Explorer Save Toolbar options

Anonymize Plans

SQL Sentry Plan Explorer can obfuscate the sensitive data in your plans. Plan Anonymization changes all Database, Table, and Column names in your plans to generic representations. 

To use this feature, select Tools > Anonymize Plan.

Your original plan is preserved in the current tab, and the anonymized plan is opened in a new tab.
SQL Sentry Plan Explorer Anonymized plan

Note:  For more information, see the Anonymize your plan details natively in Plan Explorer blog post.