SQL Exec Stats, Copyright © 2006-2010 Elemental Inc. All rights reserved.

Read Me, Intro, Main, General, Databases, File IO, Tables, Indexes, Exec Stats, Stored Procs, Dist Stats, Appendix

Appendix

 

Databases Columns

Some of the columns in the Databases gridview are straight from the sys.databases DMV. Others are computed from multiple sources.

No.ColumnNote
0DatabaseDatabase
1dbidDatabase id
2FGsNumber of Filegroups
3FilesNumber of files
4Size MBSize in MB (data files only)
5ReservedSize in MB reserved
5DataSize in MB data
5IndexSize in MB indexes
6UnallocatedSize in MB
7LogSize in MB - log files only
8LusedLog MB used
9TablesNumber of tables
10IndexesNumber of Indexes (Nonclustered?)
11XML IxNumber of XML indexes
12StatsNumber of statistics (not sure if IX+col or just col)
13create_datefrom sys.databases
14compatibility_levelfrom sys.databases
15user_accessfrom sys.databases
16statefrom sys.databases
17is_in_standbyfrom sys.databases
18recovery_modelfrom sys.databases
19is_auto_create_stats_onfrom sys.databases
20is_auto_update_stats_onfrom sys.databases
21is_parameterization_forcedfrom sys.databases

 

File IO Columns

 

No.ColumnNote
0DatabaseDatabase
1FilenameFile name
2dbidDatabase id
3fileidFile id
4typetype (0 data, 1 log)
5dsiddata space id
6statestate
7Size MBSize in MB
8TotExtentsTotal Extents (64K?)
9UsedExtentsUsed Extents
10ReadsReads (from dm_io_virtual_file_stats)
11Read BytesRead Bytes
12RdIOStallRead IO Stall ms
13WritesWrites
14Write BytesWrite Bytes
15WrIOStallWrite IO Stall ms
16IOPen_msSum IO Pending ms (from dm_io_pending_io_requests)
17IOPendingSum of IO Pending
18IOPenCntIO Pending Count
19AvgB/ReadAverage bytes per wead
20ms/ReadAverage ms per read
21AvgB/wrAverage bytes per write
22ms/WrAverage ms per write
23PhyNamePhysical file name

 

Table Space Columns

 

No.ColumnNote
0dbidDatabase id
1SchemaSchema
2ObjectObject (table or view)
3object_idobject_id
4TypeType
5RowsRows
6Reserved KBReserved KB
7Data KBData KB
8Index KBIndex KB
9UnusedUnused
9AvRszAverage row size in bytes
10ClustHas Clustered index
11IxCntNumber of nonclustered indexes
12UnqIxNumber of nonclustered unique indexes and constraints
13XmlCtNumber of XML indexes
14StCntNumber of col statistics
15PartitionsNumber of tables and indexes that partitioned
16PartsNumber of paritions
17CompressNumber of compressed indexes (clustered and nonclustered)
18rkeyNumber of references by foreign keys
19fkeyNumber of foreign keys
20defNumber of default constraints
21trgNumber of triggers
22create_datecreate date
23loblob pages (of KB?)
24ovroverflow pages
25FiltNumber of filtered indexes
26disablNumber of disabled indexes
27HypotheticalNumber of hypothetical indexes (DTA cleaned failed?)

 

Index Usage Columns

No.ColumnNote
0dbidDatabase id
1SchemaSchema
2ObjectObject (table or indexed view)
3IndexIndex name
4object_idobject_id
5index_idIndex id
6obj typeObject type
7ReservedReserved space in KB
8UsedUsed KB
9LeafLeaf KB
10row_countrow count
11CodeCl clustered, N nonclustered, Pk Primary key, UC-Unique Contraint, U unique
12Index Key ColumnsIndex key columns (column type in parenthesis)
13user seeksNumber of users seeks (from dm_db_index_usage_stats)
14user scansNumber of user scans
15user lookupsNumber of user lookups
16user updatesNumber of user updates
17Plan SeeksThe number of execution plan references (tbd: change to count only once per plan or statement?) in seek operations
18Plan ScansThe number of execution plan references in scan operations
19Plan LookupThe number of execution plan references in lookup operations
20Plan Ins UpdThe number of execution plans that reference this index in insert or update operations
21Plan DeletesThe number of execution plan references in delete operations
22Seek Plan RefThe execution plan(s) that reference the index in seek operations
23Scan Plan RefThe execution plan(s) that reference the index in scan operations
24Lookup Plan RefThe execution plan(s) that reference the index in lookup operations
25Ins Upd Plan RefThe execution plan(s) that reference the index in insert or update operations
26Delete Plan RefThe execution plan(s) that reference the index in delete operations
27last user seeklast user seek
28last user scanlast user scan
29last user lookuplast user lookup
30last user updatelast user update
31sys seeksNumber of system seeks
32sys scansNumber of system scans
33sys lookupsNumber of system lookups
34sys updatesNumber of system updates
35last sys seekLast system seek
36last sys scanLast system scan
37last sys lookupLast system lookup
38last sys updateLast system update
39ix typeindex type
40dsiddata space id
41PartitionsNumber of partitions
42is_uniqueis unique
43ignore_dup_keyignore dup key
44pri keyis primary key
45is uniq conis unique constraint
46is disabledis disabled
47is hypois hypothetical
48allow row locksallow row locks
49allow page locksallow page locks
50filtris filtered index
51Compris compressed index
52Key CntNumber of index key columns
53Include ColumnsIncluded columns
54RowPagRatioIndex selectivity divided by pages
55defFilter definition

 

Exec Stats Columns

The Exec Stats grid is populated by the query, with additional calculations.

The top row is the summary for all dm_exec_query_stats rows. The second row is the summary for only the top X rows shown below.

No.ColumnDescription
0Seqsequential number, may have later uses for cross-referencing ExecStats results for previous samples
1PrevPrevious rank, or the sequence # has sql handle at
2OffSql handle offset
3SQLSQL text
4CntExecution count
5CPU-sCPU or worker time in seconds.
6Dur-sDuration or elapsed time in seconds.
7AvCPU-usAverage CPU in micro-seconds.
8AvDur-usAverage Duration in micro-seconds.
9MxCmsMax CPU in milli-seconds.
10MxDmsMax Duration in milli-seconds.
11PhyRdsPhysical Reads
12LogRdsLogical Reads
13LogWrLogical Writes
14GenNPlan Generation Number
15Plan SzPlan size
16CompileTimeCompile time
17CompileCPUCompile CPU
18EstRowsEstimate Rows
19PlanCostPlan cost
20StCtIn batch (or proc) mode, the number of statements with this SQL handle
In stored proc mode, the number of successful plans generated.
21StmtsNumber of statements in the XML plan.
22StepsNumber of Plan Steps. Each RelOp node in the XML plan is a plan step
23sPrcNumber of stored procedure calls (from current stored procedure)
24ParallelParallel Plan: In the summary rows (1 & 2), this is the number of execution plans that have parallel operations.
For the individual query plans (rows 3 and up) this is the number of plan steps that are parallel.
25MissingIxMissing index
26ImpactMissing index impact
27WarningsWarnings
28ScansThe number of plans that involve scan operations (summary) or the number of scan operations in the given query plan. (May only count scans of > 10MB?)
29sCPUPlan Estimate CPU cost of scan operations
30sIOPlan Estimate IO cost of scan operations, 1 = 1350 pages or 10.5MB
31sRowsEstimate rows from scan operations.
32RBOpsSummary: the number of plans that contain Rebind operations.
Query Plan: the number of plan steps that have rebind operations.
33RebindsTotal number of rows involved for all rebind ops in the plan. In SQL Server 2000, this was the number of executions?
34RewindsRewinds
35PredicatesIndicates that an index seek or table scan operation had a predicate (search condition) which was not involved in the index seek.
36InsertsSummary: the number of execution plans that have insert operations.
Query Plan: The number of insert operations in the query plan.
37UpdatesUpdate operations
38DeletesDelete operations
39IRowsEstimates number of rows for all insert operations
40URowsUpdate rows
41DRowsDelete rows
42HashJHash Joins
43HashAHash Aggregates
44MergeMerge joins
45MTMMany-to-many merge joins
46SortNumber of sort operations
47dbiddatabase id
48CreationPlan Creation date-time
49LastExecLast Execution date
50OptLevOptimization Level
51EARSQL optimization Early Abort Reason
52StmtTypeStatement Type
53Paramfrom dm_exec: Parameters, in stored proc mode: list of sub procedures called

 

Show Plan Columns

The intent of this screen is to somewhat replicate the SHOWPLAN_ALL output that was available even in SQL Server 2000. The SHOWPLAN_ALL columns are: StmtText, StmtId, NodeId, Parent, PhysicalOp, LogicalOp, Argument, DefinedValues, EstimateRows, EstimateIO, EstimateCPU, AvgRowSize, TotalSubstreeCost, OutputList, Warnings, Type, Parallel, EstimateExecutions

The top row is the summary for all dm_exec_query_stats rows. The second row is the summary for only the top X rows shown below.

No.ColumnDescription
0PlanCorresponds to the Seq column from the ExecStats page.
1StmtStatementId
2CpIdStatementCompId, not sure what this means
3LineThere is one line for each RelOp in the XML plan
4DatabaseFor top level, Line 0, this is the StatementText field. For higher Line numbers, if a object is referenced, this is the Database
5SchemaSchema
6TableTable
7IndexIndex
8NodeNodeId
9ParentParent
10PhysicalOpPhysical Op
11Logical OpLogical Op
12EstRowsEstimate Rows
13EstIOEst IO
14EstCPU
15AvgRowSz
16EstTotSubTr
17OperatorOperator cost. The Total Subtree cost is not always equal to the sum of the local operation CPU and IO plus the subtrees that feed into it. Certain operations like Key Lookup and Nested Loops inner source are executed multiple times.
18Parallel
19Rebinds
20Rewinds
21TableCardTable Cardinality is a SQL Server 2008 value
22Alias
23TableRef
24SeekPred
25Predicate
26IndexSc
27Join1Should be join outer source
28Join2should be join inner source
29Join3additional join details
30Warnings
31MiscTable Cardinality is a SQL Server 2008 value
32Output

 

Distribution Stats Columns

No.ColumnDescription
0dbid
1schema
2Object
3Stat
4object_id
5stats_id
6Columns
7oType
8cType
9auto_created
10user_created
11no_recompute
12Updated
13Rows
14Sampled
15Steps
16Density
17AvgKeyLen
18StringIndex
19Density1
20Density2