How can a user view executions plans in SQL Performance Investigator (SQL PI) for SQL Server?
解决办法
To begin,
Log into the Foglight Console and navigate to the Globalview databases dashboard
Select a database agent with the SQL PI extension configured
In the SQL PI performance tree, select SQL Statements
In the bottom half Top SQL Statements chart, an Analyze Plan button is present at the top of the table. This can be clicked to select the SQL statement to drill into.
In the Advanced Analytics | Change Tracking area, the user can click on a row that displays an execution plan change.
Filter out the other change tracking categories and then click on one of the execution plan changes.
The execution plan dashboard displays the following content
Top Bar
Date — Displays all the execution date and time of the selected statement\batch
Type — Displays the type of the execution plan.
Plan handle — Displays the SQL handle on the execution plan.
In the Plan analysis section, the execution plan is displayed in tabs which present the cost of each operation and object of each step of the plan.
By pressing the Generate Plan button the execution plan is generated and can be viewed by clicking on Compare Plan.
This opens a pop up with a comparison of all available execution plans of the selected statement.
Clicking the Open in SSMS button will download a .sqlplan file which can be associated and opened with SQL Server Management Studio
The following video details how-to view execution plans in SQL PI.