Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following table shows from which tabs and entities it is possible to launch to the SQL tab, in context.

Table 10- 1 Launch in-context to following entities

TabEntities
CurrentSession, Statement or Batch.
ActivityStatement, Batch or Plan.
ObjectsStatement, Batch, Stored Procedure, Function, or Triggers.
SQLStatement entered manually by the user through "New" action.
SmarTune

The following findings in the Statement Findings table launches to the SQL tab, in context:

  • Heavy operators launch to SQL tab
  • Missing indexes launch to SQL Recommend view
  • Missing statistics launch to SQL Recommend view
  • Table growth launches to SQL History view, with a time frame of two months
  • Table Schema Change May Increase Its Accessing Time launches to SQL History view, with a time frame of two months
  • Increased launches to SQL History view, with a time frame of two months

The following figure shows the error message that is displayed if the SQL tab is opened with no statement or batch, in-context.

Figure 10- 1 No statement in context error message

...

Info

Seeking is the recommended way to use indexes.

 


The following table describes the available operation options.

Table 10- 2 Operation options

OperationDescription
Sort

The Sort operator presents the sorting of the rows returned from the previously executed operation (appears just below this operator) in a specific order, optionally eliminating duplicate entries.

Sorting is required when no index that satisfies the requested ordering exists, or when an index scan is more expensive than sorting. It is usually used as the final step to retrieve the fetched data or a prior step for the join or stream aggregate (group by) operators. In some cases, the sort operation requires more than the available memory, in which case a temporary table is used. This involves disk I/O, which impacts performance. Sorting a large number of rows makes heavy use of the CPU, which can also affect overall server performance.

The amount of memory needed for sorting can be estimated by multiplying the number of rows by the average row size. Therefore, minimizing the row size by selecting only the necessary fields will decrease the memory required for the sort operation.

Hash joinsA hash join algorithm is used to access a record directly, by creating a hash function. A hash function uses a key as input and returns a hash value, which is then used as a pointer to locate the row directly. There may be different keys with the same hash value. A good hash function almost never returns the same hash value for different keys.

Hash join algorithms are used as follows:

  • Joins. Create a hash table for the rows from the first table. For each row from the second table, probe the hash table according the hash function and return rows dictated by the join type.
  • Remove duplicates. Create a hash table for the rows of the table. Scan the hash table and return only one item for each entry.
  • Unions. Create a hash table for the rows of the first table. Return rows from the second table that do not exist in the hash table. The second table must not contain duplicate entries.
Nestled joins

Nested joins (also called nested loops) use the nested algorithm to join two tables. The nested algorithm works as follows: For each row in the outer table (the first table, appearing directly below the nested loop operator in the explain tree), SQL Server executes the access plan for the inner table (the second one).

A large number of iterations may indicate a problem in choosing the access plan due to out-of-date statistics.

Merge joinsA merge join algorithm is used to join two tables by merging them. Merge join algorithms read both tables only once; therefore it is required that the input be sorted according to the join predicates.

About viewing the text and performance findings for a statement

...

The following table describes the information displayed for the referenced tables.

Table 10- 3 Tables in use

ColumnDescription
Image Modified
Click to launch to the Objects tab with the selected table in context.
Image Modified
Click the Locator icon to locate and highlight all the operators in the execution plan that access the specified table.
UsedIndicates whether the specified table is used in the selected operator in the execution plan tree.
Image Modified

The Potential Problem icon indicates there is a potential problem in the specified table. A potential problem can be one of the following:

  • Operators of type table scan, index scan, clustered index scan and filter, where the estimated cost is greater than a predefined value (this value can be changed).
  • Operators with warnings.
TableDisplays the full table name in the following format: ([Database Name].[Owner].[Table Name]).
CostTotal cost of the access of the steps to the specified table.
Cost (%)Total cost in percentage of the access of the steps to the specified table.
RowsNumber of rows in the specified table.
Pages Allocated

The number of pages allocated in the disk for the table records, index records, and text or image data. The value might be incorrect due to out-of-date space usage information. If you suspect the value to be incorrect, use the DBCC UPDATEUSAGE command to recalculate the space usage fields.

See SQL Server Books Online for DBCC UPDATEUSAGE , for additional information.

Pages Used

The number of pages used in the disk for the table records, index records, and text or image data. The value might be incorrect due to out-of-date space usage information. If you suspect the value to be incorrect, use the DBCC UPDATEUSAGE command to recalculate the space usage fields.

See SQL Server Books Online for DBCC UPDATEUSAGE , for additional information.

Have Local Predicates Indicates whether the specified table has local predicates in the execution plan.

About indexes defined on a selected table

...

The following table describes the information displayed in the Indexes Defined On table.

Table 10- 4 Indexes defined on

ColumnDescription
Image Modified
Click to launch to the Objects tab with the selected index in context.
Image Modified
Click the Locator icon to locate and highlight all the operators in the execution plan that access the specified index.
UsedIndicates whether the specified index is used in the selected operator in the execution plan tree.
IndexDisplays the index name.
Pages Allocated

The number of pages allocated in the disk for the index records. The value may be incorrect due to out-of-date space usage information. If you suspect the value to be incorrect, use the DBCC UPDATEUSAGE command to recalculate the space usage fields.

See SQL Server Books Online for DBCC UPDATEUSAGE , for additional information.

Pages Used

The number of pages used in the disk for the index records. The value may be incorrect due to out-of-date space usage information. If you suspect the value to be incorrect, use the DBCC UPDATEUSAGE command to recalculate the space usage fields.

See SQL Server Books Online for DBCC UPDATEUSAGE , for additional information.

CostTotal cost of the access of the steps to the specified index.
Cost (%)Total cost in percentage of the access of the steps to the specified index.
Last Statistics CalculationsThe SQL Server collects statistics for each index and updates them automatically. This column displays the date that the statistics for the specified index was last updated.
Index DepthNumber of levels in the index.
UniqueIndicates whether the index is unique.
ClusteredIndicates whether the index is clustered.

About columns in table

Displays a list of all columns in the selected table displayed in Tables in use. When an index is selected in Indexes of Table, the first column constitutes the index column sorted by the position of the column in the index, and marked with an Ascending or Descending icon.

The following table describes the information displayed in Columns in Table.

Table 10- 5 Columns table

ColumnDescription
Image Modified
Indicates whether the column is part of the selected index and is sorted in ascending order.
Image Modified
Indicates whether the column is part of the selected index and is sorted in descending order.
ColumnDisplays the column name.
TypeDisplays the physical storage type of the column.
Key NumberDisplays the key number of the index column.
Used in OperatorIndicates whether the column is used in the selected operator in the Execution plan tree.
In ClauseDisplays a list of all the clauses that the specified column participates in.

About viewing statistical information on all operators in the execution plan

...

The following table shows the information displayed in the Execution plan statistics table.

Table 10- 6 Execution plan statistics

ColumnDescription
Image Modified
Locates and highlights the operator in the execution plan tree that matches the selected operator in the grid.
Operator ID and TypeDisplays the operator ID and type.
Subtree CostDisplays the cost of the operators and its sub-operators.
Estimated CostDisplays the estimated cost of the current operation. A high cost value may indicate a problem in the current implementation of the operation. If the cost value is greater than "1", it is highlighted in red. Check the Estimated I/O cost and Estimated CPU cost values to determine whether the operation is an I/O consuming operation or a CPU consuming operation (or both).
Estimated Cost (%)Displays the estimated cost (in percentage) of the current operator.
Estimated CPU CostDisplays the estimated CPU cost of the current operation. A high cost value may indicate a problem in the current implementation of the operation. If the cost value is greater than "1", it is highlighted in red.
Estimated I/O CostDisplays the estimated I/O cost of the current operation. A high cost value may indicate a problem in the current implementation of the operation. If the cost value is greater than "1", it is highlighted in red.
Estimated RowsDisplays the estimated number of rows returned from the current operation.
Avg Row SizeDisplays the estimated average row size of the rows affected by current operation.
ParallelIndicates whether the operator is running in parallel.

About displaying information on operation types (More tab > Operations)

...

The following table shows information on major operation types.

Table 10- 7 Major operations

ColumnDescription
Image Modified
Locates and highlights the operators in the Execution plan tree that match the selected major operation type.
Major Operation Type

Displays the major types of the operators.

The operators in the Execution plan tree are separated into the following major types:

  • Table (any access to table)
  • Index (any access to index)
  • Sort (any sort operation)
  • Join (any join operation)
  • Other (all other operations)
Estimated CostDisplays the total estimated cost breakdown according to major operation types.
OperationsIndicates the number of operators of specified major operation type.
ObjectsIndicates the number of referenced tables/indexes of the specified operation type. This column is only relevant for Table and Index operation types.

The following table shows information on regular operation types.

Table 10- 8 Operations

ColumnDescription
Image Modified
Locates and highlights the operators in the Execution plan tree that match the selected operation type.
Operation TypeIndicates the type of operator, such as Clustered Index Scan, Index Seek, Nested Loop, etc.
Major Operation Type

Displays the major types of the operators.

The operators in the Execution plan tree are separated into the following major types:

  • Table (any access to table)
  • Index (any access to index)
  • Sort (any sort operation)
  • Join (any join operation)
  • Other (all other operations)
Estimated CostDisplays the total estimated cost breakdown according to operation types.
OperationsIndicates the number of operators of specified major operation type.
ObjectsIndicates the number of referenced tables/indexes of the specified operation type.

About viewing general properties of a selected statement (More tab > Properties)

...

The following table shows the properties displayed for a selected statement.

Table 10- 9 Selected statement properties

FieldDescription
Statement or Batch

Displays the following information:

  • Statement ID. Displays the name of the statement or batch that the SQL tab was launched with. Can also be the name of the statement opened manually.
  • Database. Indicates the database that was in use when the statement was run.
  • Parsing User. Indicates the user that was in use when the statement was run.
CabinetIndicates the cabinet in which the statement was saved. This field is only displayed for statements that were edited and saved in the statement workshop (using the Open, Save As, or Edit options).
FolderIndicates the folder in which the statement was saved. This field is only displayed for statements that were edited and saved in the statement workshop (using the Open, Save As, or Edit options).
Access Plan

Displays the following information:

  • Estimate Cost. Indicates the total estimate cost of the statement as calculated for the last access plan.
  • Most Recent Show Plan. Indicates the last time the statement or batch was explained.
  • Plan Time. Indicates when the access plan was saved. An access plan is saved in two cases:
    1. there is no access plan for the statement and this is the first time it is saved;
    2. changes were made to the statement's access plan.

About viewing recommended indexes or statistics for a statement or batch

...

The sort order icons indicate whether the column is part of the selected index and the order in which it was sorted. If you are using SQL Server 2005, it is possible to add no-key columns that are not part of the recommended index. In this case, an include icon is displayed, indicating that the column is part of the INCLUDE statement.

Table 10- 10 Sort order icons

Sort Order IconDescription
Image Modified
Indicates whether the data in the column will be stored in the index in ascending order.
Image Modified
Indicates whether the data in the column will be stored in the index in descending order.
Image Modified
Indicates that column is part of the INCLUDE statement.

About the DDL tab

Displays the DDL text of the recommended index or statistic or the SQL Server 2005 recommendation.

...

The following table describes the information displayed in the All Changes table.

Table 10- 11 All Changes table

ColumnDescription
Image Modified
If the object that was changed is one of the entities in the Objects tab (Instance, Database, Table and Index), the Launch icon opens the Objects tab with the selected object, in-context. Also, if the change type is "Access Plan Changed" the icon will launch the Compare View with the specified access plan compared to the last access path, as detected by the "Explain Statements" process.
DateIndicates the date the change was detected. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
Change Type

Displays the type of change detected. Can be one of the following values:

  • Schema changes
  • Instance parameters changes and database option changes, as collected by the Collect Schema Changes process
  • Estimated access plan changes, as collected by the Explain Statements process
  • Actual access plan changes, as collected by the Explain Statements process (SQL Server 2005 only)
  • Volume changes, as collected by Collect Space Utilization process
ObjectIndicates the object that was changed, for example, database, table, and index.
DetailsDisplays information about the change that was made. For example if the "Auto Shrink File" option was changed in the specified database the Details column will contain: "Auto Shrink File (From NO to YES).

About viewing schema changes

...

The following table describes the information displayed in the Schema Changes table.

Table 10- 12 Schema Changes table

ColumnDescription
Image Modified
If the object that was changed is one of the entities in the Objects tab (Instance, Database, Table and Index), the Launch icon opens the Objects tab with the selected object, in-context. Also, if the change type is "Access Plan Changed" the icon will launch the Compare View with the specified access plan compared to the last access path, as detected by the "Explain Statements" process.
DateIndicates the date the change was detected. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
Change Type

Displays the type of schema change detected. Can be one of the following values:

  • File Group
  • No of Columns
  • Delete Trigger Count
  • Insert Trigger Count
  • Update Trigger Count
  • Column Attribute Changed
  • Index Created
  • Index Dropped
  • Index keys Changed
  • Index Cluster Property Changed
  • Index Unique Property Changed
  • Index Pad Property Changed
  • Index Auto Statistics Property Changed
  • Index Row Lock Disallowed Changed
  • Index Page Lock Disallowed Changed
  • Index Fill Factor Changed
ObjectIndicates the object that was changed, for example, database, table, and index.
DetailsDisplays information about the change that was made. For example if the "Auto Shrink File" option was changed in the specified database the Details column will contain: "Auto Shrink File (From NO to YES).

About viewing estimated access plan changes

...

The following table describes the information displayed in the Estimated Access Plan Changes table.

Table 10- 13 Estimated Access Plan Changes table

ColumnDescription
Image Modified
Click on the tune icon to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
Image Modified
The Launch and Compare icon opens the access plan in Compare view and enables you to compare the specified access plan with the last access plan, as detected by the "Explain Statements" process.
DateIndicates the date the specified access plan was detected by the "Explain Statements" process.
Estimated CostIndicates the estimated cost of the specified access plan.
Table ScansDisplays the number of table scans performed in the specified access plan.
Index ScansDisplays the number of index scans performed in the specified access plan.
ParallelDisplays the number of parallel operations performed in the specified access plan.
Nested LoopsDisplays the number of nested loops performed in the specified access plan.
Merge JoinsDisplays the number of merge joins performed in the specified access plan.
Hash JoinsDisplays the number of hash joins performed in the specified access plan.
SortsDisplays the number of sort operations performed in the specified access plan.

About viewing actual access plan changes

...

The following table describes the information displayed in the Actual Access Plan Changes table.

Table 10- 14 Actual Access Plan Changes table

ColumnDescription
Image Modified
Click on the Tune icon to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
Image Modified
The Launch and Compare icon opens the access plan in Compare view and enables you to compare the specified access plan with the last access plan.
DateIndicates the date the specified access plan was executed, as taken from system views. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
Estimated CostIndicates the estimated cost of the specified access plan.
Table ScansDisplays the number of table scans performed in the specified access plan.
Index ScansDisplays the number of index scans performed in the specified access plan.
ParallelDisplays the number of parallel operations performed in the specified access plan.
Nested LoopsDisplays the number of nested loops performed in the specified access plan.
Merge JoinsDisplays the number of merge joins performed in the specified access plan.
Hash JoinsDisplays the number of hash joins performed in the specified access plan.
SortsDisplays the number of sort operations performed in the specified access plan.

About viewing instance parameters changes

...

The following table describes the information displayed in the Instance Parameters Changes table.

Table 10- 15 Instance parameters changes table

ColumnDescription
Image Modified
The Launch icon opens the Objects tab with the selected instance.
DateIndicates the date the change was detected. Click on the link to display the plan after the change occurred. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
DetailsDisplays additional information on the Instance Parameters change that was made, including the name of the parameter, and old and new values.

The following parameter changes are displayed:

...

The following table describes the information displayed in the Database Options Changes table.

Table 10- 16 Database options changes

ColumnDescription
Image Modified
The Launch icon opens the Objects tab with the selected database.
DateIndicates the date the change was detected. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
DatabaseDisplays the name of the database in which the changes occurred.
DetailsProvides additional information on the type of database change that was made, including the name of the database option, and the old and new values.

The following database options changes are displayed:

...

The following table describes the information displayed in the Volume Changes table.

Table 10- 17 Volume changes table

ColumnDescription
Image Modified
The Launch icon opens the Objects tab with the selected database.
DateIndicates the date the change was detected. Click on the link to switch to Plan view and display the first access plan that was created by the Explain Statements process after the specified change was detected.
ObjectIndicates the object that was changed.
DetailsDisplays information about the change that was made.

Comparing access plans of a specified statement

...

The following table describes the information displayed for each access plan in the Compare Statements table.

Table 10- 18 Compare statements table

ColumnDescription
Plan TimeIndicates when the specified access plan was performed.
Plan TypeIndicates whether the specified access plan is an estimated or actual access plan.
Estimated CostDisplays the estimated cost of the specified access plan.
Table ScansIndicates the number of table scans performed in the specified access plan.
Index ScansIndicates the number of index scans performed in the specified access plan.
Parallel AccessIndicates the number of parallel operations performed in the specified access plan.
Nested LoopsIndicates the number of nested loops performed in the specified access plan.
Merge JoinsIndicates the number of merge joins performed in the specified access plan.
Hash JoinsIndicates the number of hash joins performed in the specified access plan.
SortsIndicates the number of sort operations performed in the specified access plan.
Info

It is also possible to access the Compare View from the Access Plan Changes table. Click the Compare icon in the Access Plan Changes table to open the Compare view with the selected access plan, in-context, and compare it with the last access plan.

...

The following table describes the information displayed in the Statements View table.

Table 10- 19 Statements view table

ColumnDescription
Image Modified

Switches to Plan view, with the selected statement in-context.

This icon is only enabled at the batch level and in the statement that was captured by the Collector.

IDIndicates the ID of the statement in the batch.
Collector StatementDisplays the ID of the statement and batch as assigned by the Precise for SQL Server collector. Click on the link to display the plan after the change occurred.
Physical OperatorDescribes how a query or update was executed. The physical operator describes the physical implementation used to process a statement, for example: Batch level, Select, Update, Cond, etc.
OperationsDisplays the number of operations in the specified statement.
Table ScansDisplays the number of Table Scans performed in the specified statement.
Index ScansDisplays the number of Index Scans performed in the specified statement.
JoinsDisplays the number of join operations performed in the specified statement.
SortsDisplays the number of sort operations performed in the specified statement.
Estimated CostDisplays the estimated cost for the specified statement.

Anchor
Abouttuningactions
Abouttuningactions
About tuning actions

...

  1. Do one of the following:
    • Launch to the SQL tab with a statement in context
    • Open the statement you want to analyze in the SQL tab
  2. On the Statement tab, observe the access plan statements and their estimated cost.
  3. Determine which of the statements have the highest estimated cost and focus your analysis on that statement.

 

Precise. Performance intelligence from click to storage. Learn more > >

 

...

  1. that

...

  1. statement.