MSS_STMTHISTDET SAP (History details for an expensive SQL statement) Structure details
Description: History details for an expensive SQL statement
Related tables to MSS_STMTHISTDET
Access table MSS_STMTHISTDET
Structure field list including key, data, relationships and ABAP select examples
MSS_STMTHISTDET is a standard SAP Structure so does not store data like a database table does. It can be used to define the fields of other actual tables or to process "History details for an expensive SQL statement" Information within sap ABAP programs.
This is done by declaring abap internal tables, work areas or database tables based on this Structure. These can then be used to store and process the required data appropriately.
i.e. DATA: wa_MSS_STMTHISTDET TYPE MSS_STMTHISTDET.
The MSS_STMTHISTDET table consists of various fields, each holding specific information or linking keys about History details for an expensive SQL statement data available in SAP. These include STW_COLLID (Unique ID of a set of collected expensive SQL Statements), COLL_DT (Date when SQL Statement statistics were saved), COLL_TM (Time when SQL Statement statistics were saved), HIGH_ELAP (High elapsed time).. See below for full list along with technical details, documentation, text table, check tables, foreign key relationships, conversion routines, relevant tcodes and example ABAP select code etc. .
Delivery Class:Display/Maintenance via tcode SM30: Display/Maintenance Allowed but with Restrictions
SAP enhancement categories: Cannot Be Enhanced
SAP MSS_STMTHISTDET structure fields - Full list of fields found in SAP data dictionary
Field | Description | Data Element | Data Type | length (Dec) | Check table | Conversion Routine | Domain Name | MemoryID | SHLP |
STW_ID | Unique ID of a set of collected expensive SQL Statements | MSSSTMTHCOLLID | DEC | 20 | |||||
STW_COLLID | Unique ID of a set of collected expensive SQL Statements | MSSSTMTHCOLLID | DEC | 20 | |||||
COLL_DT | Date when SQL Statement statistics were saved | MSSSTMTHDT | DATS | 8 | |||||
COLL_TM | Time when SQL Statement statistics were saved | MSSSTMTHTM | TIMS | 6 | |||||
HIGH_ELAP | High elapsed time | MSSELAPFLAG | CHAR | 1 | CHAR1 | ||||
PCT_ELAPSED_TIME | Percentage of all server elapsed times | MSSPCTELAPSEDTIME | DEC | 5(2) | |||||
HIGH_CALLS | Flag set if statement was included because of # of calls | MSSCALLSFLAG | CHAR | 1 | CHAR1 | ||||
PCT_EXEC_COUNT | Percentage of server total execution counts | MSSPCTEXECCNT | DEC | 5(2) | |||||
HIGH_PHYRD | Statement included because of high physical reads | MSSPHYRDFLAG | CHAR | 1 | CHAR1 | ||||
PCT_PHYS_READS | Percent of all physical reads | MSSPCTPHYSREADS | DEC | 5(2) | |||||
HIGH_LOGRD | High logical reads for this statement | MSSLOGRDFLAG | CHAR | 1 | CHAR1 | ||||
PCT_LOGICAL_READS | Percent of server wide logical reads | MSSPCTLOGICALREADS | DEC | 5(2) | |||||
HIGH_LOGWR | Statement has high logical writes | MSSLOGWRFLAG | CHAR | 1 | CHAR1 | ||||
PCT_LOG_WRITES | Percentage of all logical writes | MSSPCTLOGWRITES | DEC | 5(2) | |||||
HIGH_CPU | High CPU time | MSSCPUFLAG | CHAR | 1 | CHAR1 | ||||
PCT_CPU_TIME | Percent of total worker time | MSSPCTWORKERTIME | DEC | 5(2) | |||||
SQLTEXT | First 50 characters of a SQL Server statement | MSSPARTIALSQL | CHAR | 50 | TEXT50 | ||||
SQLHANDLE | handle pointing to sql statment or procedure | MSSSQLHANDLE | CHAR | 130 | MSSHANDLE | ||||
PLANHANDLE | handle pointing to plan used in execution of sql stmt/proc | MSSPLANHANDLE | CHAR | 130 | MSSHANDLE | ||||
OBJ_NAME | MS SQL Server object name | MSSOBJNAME | CHAR | 30 | TEXT30 | ||||
EXEC_COUNT | Number of plan executions since last compile | MSSEXECCOUNT | DEC | 20 | |||||
TTL_LOGICAL_READS | Total logical reads for this plan since compiled | MSSTTLLOGICALREADS | DEC | 20 | |||||
AVG_LOGICAL_READS | Average logical reads for this plan since compiled | MSSAVGLOGICALREADS | DEC | 20 | |||||
MAX_LOGICAL_READS | Maximum number of logical reads this plan has ever performed | MSSMAXLOGICALREADS | DEC | 20 | |||||
MIN_LOGICAL_READS | Minimum number of logical reads this plan has ever performed | MSSMINLOGICALREADS | DEC | 20 | |||||
LAST_LOGICAL_READS | Last logical reads for this plan since compiled | MSSLASTLOGICALREADS | DEC | 20 | |||||
TTL_ELAPSED_TIME | Total elapsed time in microseconds | MSSTTLELAPSEDTIME | DEC | 20 | |||||
AVG_ELAPSED_TIME | Average elapsed time in microseconds | MSSAVGELAPSEDTIME | DEC | 20 | |||||
MAX_ELAPSED_TIME | Maximum elapsed time in microseconds | MSSMAXELAPSEDTIME | DEC | 20 | |||||
MIN_ELAPSED_TIME | Minimum elapsed time in microseconds | MSSMINELAPSEDTIME | DEC | 20 | |||||
LAST_ELAPSED_TIME | Last elapsed time in microseconds | MSSLASTELAPSEDTIME | DEC | 20 | |||||
ET_PER_ROW | Elapsed time in microseconds per row | MSSETPERROW | DEC | 20 | |||||
TTL_ROWS | Total number of rows returned for a query plan | MSSTTLROWS | DEC | 20 | |||||
AVG_ROWS | Average rows returned per execution | MSSAVGROWS | DEC | 20 | |||||
MAX_ROWS | Maximun number of rows returned for a query plan | MSSMAXQROWS | DEC | 20 | |||||
MIN_ROWS | Minimum number of rows returned for a query plan | MSSMINQROWS | DEC | 20 | |||||
LAST_ROWS | Total number of rows returned for a query plan | MSSLASTROWS | DEC | 20 | |||||
AVG_CPU_TIME | Average amount of CPU time consumed by executions | MSSAVGWORKERTIME | DEC | 20 | |||||
MAX_CPU_TIME | Maximum CPU time consumed by this plan | MSSMAXWORKERTIME | DEC | 20 | |||||
MIN_CPU_TIME | Minimum CPU time consumed by this plan | MSSMINWORKERTIME | DEC | 20 | |||||
LAST_CPU_TIME | CPU time consumed by last execution of this plan | MSSLASTWORKERTIME | DEC | 20 | |||||
TTL_PHYS_READS | Total physical reads for this plan | MSSTTLPHYSREADS | DEC | 20 | |||||
AVG_PHYS_READS | Average physical reads for this plan | MSSAVGPHYSREADS | DEC | 20 | |||||
MAX_PHYS_READS | Maximum number of physical reads for this plan | MSSMAXPHYSREADS | DEC | 20 | |||||
MIN_PHYS_READS | Minimum number of physical reads for this plan | MSSMINPHYSREADS | DEC | 20 | |||||
LAST_PHYS_READS | Physical reads last time this plan executed | MSSLASTPHYSREADS | DEC | 20 | |||||
TTL_LOG_WRITES | Total logical writes for this plan since compiled | MSSTTLLOGWRITES | DEC | 20 | |||||
AVG_LOG_WRITES | Average logical writes for this plan since compiled | MSSAVGLOGWRITES | DEC | 20 | |||||
MAX_LOG_WRITES | Maximum logical writes for this plan for a single execution | MSSMAXLOGWRITES | DEC | 20 | |||||
MIN_LOG_WRITES | Minimum logical writes for this plan for a single execution | MSSMINLOGWRITES | DEC | 20 | |||||
LAST_LOG_WRITES | Total logical writes for this plan since compiled | MSSLASTLOGWRITES | DEC | 20 | |||||
WAIT_FACTOR | Elapsed time/CPU time | MSSWAITFACTOR | DEC | 20 | |||||
EXECS_PER_HOUR | Executions per hour | MSSEXECSPH | DEC | 16(3) | |||||
STMT_START_OFFSET | Start statement offset | MSSSTARTOFFSET | INT4 | 10 | INT4 | ||||
STMT_END_OFFSET | Statement end offset | MSSENDOFFSET | INT4 | 10 | INT4 | ||||
ABAP_NAME | Name of the ABAP report | MSSABNAME | CHAR | 40 | PROGNAME | ||||
ABAP_LOC | Offset of a Processing Control Block | ABP_CONT | INT4 | 10 | |||||
PLAN_GEN_NUM | Number of times this plan has been recompiled | MSSPLANGENNUM | DEC | 20 | |||||
CREATION_TIME | MS SQL Server time at which the plan was compiled. | MSSPLANCRETIME | CHAR | 20 | TEXT20 | ||||
LAST_EXEC_TIME | MS SQL Server: Last time at which the plan was executed. | MSSPLANEXECTIME | CHAR | 20 | TEXT20 | ||||
LINE_COLOR | Color attributes of this entry | 0 |
Key field | Non-key field |
How do I retrieve data from SAP structure MSS_STMTHISTDET using ABAP code?
As MSS_STMTHISTDET is a database structure and not a table it does not store any data in the SAP data dictionary. The ABAP SELECT statement is therefore not appropriate and can not be performed on MSS_STMTHISTDET as there is no data to select.How to access SAP table MSS_STMTHISTDET
Within an ECC or HANA version of SAP you can also view further information about MSS_STMTHISTDET and the data within it using relevant transactions such asSE11 (ABAP Dictionary Maintenance)
SM30 (Maintain Table Data)
SE80 (Object Navigator)
SE16 (Data Browser).
Search for further information about these or an SAP related objects