DB2QSTC SAP (Structure for Statement Trace) Structure details
Description: Structure for Statement Trace
Structure field list including key, data, relationships and ABAP select examples
DB2QSTC 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 "Structure for Statement Trace" 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_DB2QSTC TYPE DB2QSTC.
The DB2QSTC table consists of various fields, each holding specific information or linking keys about Structure for Statement Trace data available in SAP. These include QSTCTOKN (Statement ID), QSTCUSE (Current Copies), QSTCCOPY (Number of copies of the statement), QSTCSTAT (Status of the statement).. 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 DB2QSTC 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 |
QSTCSTNM | DB2 statement name | DB2QSTSTNM | RAW | 16 | DB2RAW16 | ||||
QSTCTOKN | Statement ID | DB2QSTTOKN | INT4 | 10 | DB2INT4 | ||||
QSTCUSE | Current Copies | DB2QSTUSE | DEC | 19 | DB2DEC19V | ||||
QSTCCOPY | Number of copies of the statement | DB2QSTCOPY | INT4 | 10 | DB2INT4 | ||||
QSTCSTAT | Status of the statement | DB2QSTSTAT | CHAR | 30 | DB2CHAR30 | ||||
QSTCLR | Cache literal replacement indicator | DB2QSTLR | CHAR | 10 | |||||
QSTCIDDL | Statement invalidated by DROP or ALTER | DB2QSTIDDL | CHAR | 5 | DB2CHAR05 | ||||
QSTCIRVK | Statement invalidated by REVOKE | DB2QSTIRVK | CHAR | 5 | DB2CHAR05 | ||||
QSTCIRST | Statement invalidated by RUNSTATS | DB2QSTIRST | CHAR | 5 | DB2CHAR05 | ||||
QSTCCLRU | Statement removed from cache by LRU (last recently used) | DB2QSTCLRU | CHAR | 5 | DB2CHAR05 | ||||
QSTCISTM | Time when statement was inserted into cache | DB2QSTISTC | CHAR | 14 | DB2CHAR14 | ||||
QSTCEXEC | Number of executions of the statement | DB2QSTEXEC | DEC | 19 | DB2DEC19V | ||||
QSTCRBUF | Synchronous Reads | DB2QSTRBUF | DEC | 19 | DB2DEC19V | ||||
QSTCGPAG | Getpages | DB2QSTGPAG | DEC | 19 | DB2DEC19V | ||||
QSTCEROW | Rows examined (Only data rows are taken into account) | DB2QSTEROW | DEC | 19 | DB2DEC19V | ||||
QSTCPROW | Rows Processed | DB2QSTPROW | DEC | 19 | DB2DEC19V | ||||
QSTCSORT | Number of sorts performed for statement | DB2QSTSORT | DEC | 19 | DB2DEC19V | ||||
QSTCINDX | Number of index scans performed for statement | DB2QSTINDX | DEC | 19 | DB2DEC19V | ||||
QSTCTSCN | Number of tablespace scans performed for statement | DB2QSTTSCN | DEC | 19 | DB2DEC19V | ||||
QSTCPLGP | Number of parallel groups created for statement | DB2QSTPLGP | DEC | 19 | DB2DEC19V | ||||
QSTCWRIT | Synchronous Writes | DB2QSTWRIT | DEC | 19 | DB2DEC19V | ||||
QSTCAET | Time elapsed | DB2QSTCAET | CHAR | 19 | |||||
QSTCSTLN | The length of the SQL Statement | DB2QSTSTLN | INT2 | 5 | INT2 | ||||
QSTCSTMT | Statement text | DB2QSTSTMT | CHAR | 255 | |||||
QW0316TM2 | Time when stmt was inserted into cache - stored clock format | DB2QW316TM2 | CHAR | 14 | |||||
QW0316UT1 | Date/Time when stmt stat was updated -in stored clock format | DB2QW316UT1 | CHAR | 14 | |||||
QW0316UT2 | Date/Time when the stmt stat was updated -in external format | DB2QW316UT2 | CHAR | 14 | |||||
QW0316L1 | Length of program name | DB2QW316L1 | INT2 | 5 | INT2 | ||||
QW0316T1 | Program name | DB2QW316T1 | CHAR | 128 | CHAR128 | ||||
QW0316LX | Statement Line Number | DB2QW316LX | INT4 | 10 | DB2INT4 | ||||
QW0316T2 | Transaction name | DB2QW316T2 | CHAR | 32 | DB2CHAR32 | ||||
QW0316L3 | Length of user ID | DB2QW316L3 | INT2 | 5 | INT2 | ||||
QW0316T3 | User ID | DB2QW316T3 | CHAR | 128 | CHAR128 | ||||
QW0316X4 | User group | DB2QW316X4 | CHAR | 128 | CHAR128 | ||||
QW0316X5 | The value of QUALIFIER bind option | DB2QW316X5 | CHAR | 128 | CHAR128 | ||||
QW0316X6 | ISOLATION | DB2QW316X6 | CHAR | 3 | DB2CHAR03 | ||||
QW0316X7T | CURRENTDATA | DB2QW316X7 | CHAR | 3 | DB2CHAR03 | ||||
QW0316X8T | DYNAMICRULES | DB2QW316X8 | CHAR | 4 | DB2CHAR04 | ||||
QW0316X9T | CURRENT DEGREE | DB2QW316X9 | CHAR | 3 | DB2CHAR03 | ||||
QW0316XAT | CURRENT RULES | DB2QW316XA | CHAR | 3 | DB2CHAR03 | ||||
QW0316XBT | CURRENT PRECISION | DB2QW316XB | CHAR | 5 | DB2CHAR05 | ||||
QW0316XCT | WITH HOLD | DB2QW316XC | CHAR | 3 | DB2CHAR03 | ||||
QW0316TS | Timestamp: Begin of Statistics Collection | DB2QM316TS | CHAR | 16 | DB2CHAR16 | ||||
QW0316CT | Accumulated CPU Time | DB2QM316CT | CHAR | 16 | DB2CHAR16 | ||||
QW0316W1 | Accumulated Wait Time for Synchronous I/O | DB2QM316W1 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W2 | Accumulated Wait Time for Lock and Latch Req. | DB2QM316W2 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W3 | Accumulated Wait Time for Sync. Execution Unit Switch | DB2QM316W3 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W4 | Accumulated Wait Time for Global Locks | DB2QM316W4 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W5 | Accumulated Wait Time for Read Activity by Another Thread | DB2QM316W5 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W6 | Accumulated Wait Time for Write Activity by Another Thread | DB2QM316W6 | CHAR | 16 | DB2CHAR16 | ||||
QW0316W7 | Accumulated wait time for latch req | DB2QW316W7C | CHAR | 16 | |||||
QW0316W8 | Accumulated wait time for page latch | DB2QW316W8C | CHAR | 16 | |||||
QW0316W9 | Accumulated wait time for drain lock | DB2QW316W9C | CHAR | 16 | |||||
RRSAFPGM | Program name | DB2QW316T1 | CHAR | 128 | CHAR128 | ||||
QW0316WA | Acc. wait for drain when waiting for claims to be released | DB2QW316WAC | CHAR | 16 | |||||
RRSAFLEN | Statement Line Number | DB2Q316CLX | CHAR | 10 | DB2CHAR10 | ||||
QW0316WB | Accumulated wait time for logwriter | DB2QW316WBC | CHAR | 16 | |||||
RETOEXECS | 0 | ||||||||
QW0316XE | ENDuser ID - Value provided on RRS (re)signon | DB2QW316XE | CHAR | 16 | |||||
QW0316XF | Workstation name - Value provided on RRS (re)signon | DB2QW316XF | CHAR | 18 | |||||
QW0316RT | RID List Not Used due to DB2 Limits Exceeded | DB2QW316RT | DEC | 19 | DB2DEC19V | ||||
QW0316RS | RID List Not Used due to Insufficient Storage | DB2QW316RS | DEC | 19 | DB2DEC19V | ||||
RRSAFPGM | Program name | DB2QW316T1 | CHAR | 128 | CHAR128 | ||||
RRSAFLEN | Statement Line Number | DB2Q316CLX | CHAR | 10 | DB2CHAR10 | ||||
RETOEXECS | Average rows examined(Only data rows are taken into account) | DB2RETOEXECS | DEC | 25(6) | DB2DEC25V6 | ||||
RPTOEXECS | Average rows processed | DB2RPTOEXECS | DEC | 25(6) | DB2DEC25V6 | ||||
RPTOROWEXE | Ratio: Rows processed to rows examined of statement | DB2RPTOREX | CHAR | 26 | |||||
RAETOEXECS | Average elapsed time Average elapsed time | DB2RAETOEXECS | DEC | 19(6) | DB2DEC19V6 | ||||
RAETOROWS | Average elapsed time / row | DB2RAETOROWS | DEC | 19(6) | DB2DEC19V6 | ||||
AVGCPU | Average CPU time Average CPU time | DB2AVGCT | DEC | 19(6) | DB2DEC19V6 | ||||
AVGWAIT | Average wait time Average wait time | DB2AVGW | DEC | 19(6) | DB2DEC19V6 | ||||
AVGSIOW | Average synchronous I/O time Average synchronous I/O time | DB2AVGW1 | DEC | 19(6) | DB2DEC19V6 | ||||
AVGSYIO | Average synchronous I/Os | DB2XVGSYIO | DEC | 25(6) | DB2DEC25V6 | ||||
RIDFAIL | RID list failures | DB2RIDFAIL | CHAR | 19 | |||||
GPRPROC | Getpages per rows processed Getpages per rows processed | DB2GPPRPROC | DEC | 21(2) | DB2DEC21V2 | ||||
RETOPROW | Examined/processed Rows (Only data rows are taken into acc.) | DB2RETOPROW | DEC | 21(2) | DB2DEC21V2 | ||||
STATTXT | Status | DB2STATTXT | CHAR | 18 | DB2CHAR18 | ||||
TIMWAIT | Wait time | DB2TIMWAIT | CHAR | 26 | |||||
AVGLOLA | Average wait for lock/latch Average wait for lock/latch | DB2AVGW2 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMSYIO | Wait time for synchronous I/O | DB2TIMSYIO | CHAR | 26 | |||||
AVGEUSW | Average wait for EU switch Average wait for EU switch | DB2AVGW3 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMLOLA | Wait time for lock/latch | DB2TIMLOLA | CHAR | 26 | |||||
AVGGLLO | Average wait for global lock Average wait for global lock | DB2AVGW4 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMEUSW | Wait time for EU switch | DB2TIMEUSW | CHAR | 26 | |||||
AVGREAD | Average wait for other read Average wait for other read | DB2AVGW5 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMGLLO | Wait time for global lock | DB2TIMGLLO | CHAR | 26 | |||||
AVGWRIT | Average wait for other write Average wait for other write | DB2AVGW6 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMREAD | Wait time for other read | DB2TIMREAD | CHAR | 26 | |||||
AVGLARQ | Average wait time for latch req | DB2AVGW7 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMWRIT | Wait time for other write | DB2TIMWRIT | CHAR | 26 | |||||
AVGPGLA | Average wait time for page latch | DB2AVGW8 | DEC | 19(6) | DB2DEC19V6 | ||||
TIMOTHE | Other wait time | DB2TIMOTHE | CHAR | 26 | |||||
AVGDRLO | Average wait time for drain lock | DB2AVGW9 | DEC | 19(6) | DB2DEC19V6 | ||||
RANBTONE | Average synchronous reads | 0 | |||||||
AVGCLRL | Average wait for drain when waiting for claims to be rel. | DB2AVGWA | DEC | 19(6) | DB2DEC19V6 | ||||
RANWTONE | Average synchronous writes | 0 | |||||||
AVGLOGW | Average wait time for logwriter | DB2AVGWB | DEC | 19(6) | DB2DEC19V6 | ||||
RANGTONE | Average getpages | 0 | |||||||
AVGOTHE | Average other wait time (dec) Average other wait time | DB2AVGOTHED | DEC | 19(6) | |||||
RANSTONE | Average sorts | 0 | |||||||
TIMCPU | CPU time | DB2TIMCPU | CHAR | 26 | |||||
RANITONE | Average index scans | 0 | |||||||
TIMWAIT | Wait time | DB2TIMWAIT | CHAR | 26 | |||||
RANTTONE | Average tablespace scans | 0 | |||||||
TIMSYIO | Wait time for synchronous I/O | DB2TIMSYIO | CHAR | 26 | |||||
RARSTONE | Average RID failures - no storage | 0 | |||||||
TIMLOLA | Wait time for lock/latch | DB2TIMLOLA | CHAR | 26 | |||||
RARTTONE | 0 | ||||||||
TIMEUSW | Wait time for EU switch | DB2TIMEUSW | CHAR | 26 | |||||
RANLTONE | Average parallel groups | 0 | |||||||
TIMGLLO | Wait time for global lock | DB2TIMGLLO | CHAR | 26 | |||||
RANGTONP | Getpages per rows processed | DB2NGTONP | DEC | 25(6) | DB2DEC25V6 | ||||
TIMREAD | Wait time for other read | DB2TIMREAD | CHAR | 26 | |||||
RANRTONP | Examined/rows processed (Only data rows are taken into acc.) | DB2NRTONP | DEC | 25(6) | DB2DEC25V6 | ||||
TIMWRIT | Wait time for other write | DB2TIMWRIT | CHAR | 26 | |||||
RAW1TOBW | Average duration of a synchronous I/O | DB2W1TOBW | CHAR | 26 | |||||
TIMLARQ | wait time for latch req | 0 | |||||||
EXECPSEC | Average executions per second | DB2EXESEC | DEC | 25(6) | DB2DEC25V6 | ||||
TIMPGLA | wait time for page latch | 0 | |||||||
QW0316W1N | Accumulated Wait Time for Synchronous I/O | DB2QW316W1 | DEC | 16 | DB2DEC16 | ||||
TIMDRLO | wait time for drain lock | 0 | |||||||
QW0316W2N | Accumulated Wait Time for Lock and Latch Req. | DB2QW316W2 | DEC | 16 | DB2DEC16 | ||||
TIMCLRL | wait for drain when waiting for claims to be rel. | 0 | |||||||
QW0316W3N | Accumulated Wait Time for Sync. Execution Unit Switch | DB2QW316W3 | DEC | 16 | DB2DEC16 | ||||
TIMLOGW | wait time for logwriter | 0 | |||||||
QW0316W4N | Accumulated Wait Time for Global Locks | DB2QW316W4 | DEC | 16 | DB2DEC16 | ||||
TIMOTHE | Other wait time | DB2TIMOTHE | CHAR | 26 | |||||
QW0316W5N | Accumulated Wait Time for Read Activity by Another Thread | DB2QW316W5 | DEC | 16 | DB2DEC16 | ||||
RANBTONE | Average synchronous reads Average synchronous reads | DB2AVGRBUF | DEC | 25(6) | DB2DEC25V6 | ||||
QW0316W6N | Accumulated Wait Time for Write Activity by Another Thread | DB2QW316W6 | DEC | 16 | DB2DEC16 | ||||
RANWTONE | Average synchronous writes Average synchronous writes | DB2AVGWRITE | DEC | 25(6) | DB2DEC25V6 | ||||
QW0316CTN | Accumulated CPU Time | DB2QW316CT | DEC | 16 | DB2DEC16 | ||||
QSTCAETN | Time elapsed | DB2QSTAET | DEC | 16 | DB2DEC16 | ||||
RANGTONE | Average getpages Average getpages | DB2AVGGPAG | DEC | 25(6) | DB2DEC25V6 | ||||
QW0316TD | Name of the table referenced in the statement | DB2QW316TD | CHAR | 128 | CHAR128 | ||||
RANSTONE | Average sorts Average sorts | DB2AVGSORT | DEC | 25(6) | DB2DEC25V6 | ||||
MEMBNM | DB2 member name in data sharing environment | DB2MEMN | CHAR | 8 | DB2CHAR08 | ||||
RANITONE | Average index scans Average index scans | DB2AVGINDX | DEC | 25(6) | DB2DEC25V6 | ||||
STATUID | STATUID as used by SAP BW to identify OLAP queries | 0 | |||||||
RANTTONE | Average tablespace scans Average tablespace scans | DB2AVGTSCN | DEC | 25(6) | DB2DEC25V6 | ||||
RARSTONE | Average RID failures - no storage Average RID failures - no storage | DB2AVG316RS | DEC | 25(6) | DB2DEC25V6 | ||||
RARTTONE | Average RID failures - limit | DB2AVG316RT | DEC | 25(6) | DB2DEC25V6 | ||||
RANLTONE | Average parallel groups Average parallel groups | DB2AVGPLGP | DEC | 25(6) | DB2DEC25V6 | ||||
RANGTONP | Getpages per rows processed | DB2NGTONP | DEC | 25(6) | DB2DEC25V6 | ||||
RANRTONP | Examined/rows processed (Only data rows are taken into acc.) | DB2NRTONP | DEC | 25(6) | DB2DEC25V6 | ||||
RAW1TOBW | Average duration of a synchronous I/O | DB2W1TOBW | CHAR | 26 | |||||
EXECPSEC | Average executions per second | DB2EXESEC | DEC | 25(6) | DB2DEC25V6 | ||||
QW0316W1N | Accumulated Wait Time for Synchronous I/O | DB2QW316W1 | DEC | 16 | DB2DEC16 | ||||
QW0316W2N | Accumulated Wait Time for Lock and Latch Req. | DB2QW316W2 | DEC | 16 | DB2DEC16 | ||||
QW0316W3N | Accumulated Wait Time for Sync. Execution Unit Switch | DB2QW316W3 | DEC | 16 | DB2DEC16 | ||||
QW0316W4N | Accumulated Wait Time for Global Locks | DB2QW316W4 | DEC | 16 | DB2DEC16 | ||||
QW0316W5N | Accumulated Wait Time for Read Activity by Another Thread | DB2QW316W5 | DEC | 16 | DB2DEC16 | ||||
QW0316W6N | Accumulated Wait Time for Write Activity by Another Thread | DB2QW316W6 | DEC | 16 | DB2DEC16 | ||||
QW0316W7N | Accumulated wait time for latch req | DB2QW316W7 | DEC | 16 | |||||
QW0316W8N | Accumulated wait time for page latch | DB2QW316W8 | DEC | 16 | |||||
QW0316W9N | Accumulated wait time for drain lock | DB2QW316W9 | DEC | 16 | |||||
QW0316WAN | Acc. wait for drain when waiting for claims to be released | DB2QW316WA | DEC | 16 | |||||
QW0316WBN | Accumulated wait time for logwriter | DB2QW316WB | DEC | 16 | |||||
QW0316CTN | Accumulated CPU Time | DB2QW316CT | DEC | 16 | DB2DEC16 | ||||
QSTCAETN | Time elapsed | DB2QSTAET | DEC | 16 | DB2DEC16 | ||||
QW0316TD | Name of the table referenced in the statement | DB2QW316TD | CHAR | 128 | CHAR128 | ||||
MEMBNM | DB2 member name in data sharing environment | DB2MEMN | CHAR | 8 | DB2CHAR08 | ||||
STATUID | STATUID as used by SAP BW to identify OLAP queries | 0 |
Key field | Non-key field |
How do I retrieve data from SAP structure DB2QSTC using ABAP code?
As DB2QSTC 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 DB2QSTC as there is no data to select.How to access SAP table DB2QSTC
Within an ECC or HANA version of SAP you can also view further information about DB2QSTC 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