DB2QSTC SAP (Structure for Statement Trace) Structure details

Dictionary Type: Structure
Description: Structure for Statement Trace




ABAP Code to SELECT data from DB2QSTC
Related tables to DB2QSTC
Access table DB2QSTC




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
QSTCSTNMDB2 statement name DB2QSTSTNMRAW16DB2RAW16
QSTCTOKNStatement ID DB2QSTTOKNINT410DB2INT4
QSTCUSECurrent Copies DB2QSTUSEDEC19DB2DEC19V
QSTCCOPYNumber of copies of the statement DB2QSTCOPYINT410DB2INT4
QSTCSTATStatus of the statement DB2QSTSTATCHAR30DB2CHAR30
QSTCLRCache literal replacement indicator DB2QSTLRCHAR10
QSTCIDDLStatement invalidated by DROP or ALTER DB2QSTIDDLCHAR5DB2CHAR05
QSTCIRVKStatement invalidated by REVOKE DB2QSTIRVKCHAR5DB2CHAR05
QSTCIRSTStatement invalidated by RUNSTATS DB2QSTIRSTCHAR5DB2CHAR05
QSTCCLRUStatement removed from cache by LRU (last recently used) DB2QSTCLRUCHAR5DB2CHAR05
QSTCISTMTime when statement was inserted into cache DB2QSTISTCCHAR14DB2CHAR14
QSTCEXECNumber of executions of the statement DB2QSTEXECDEC19DB2DEC19V
QSTCRBUFSynchronous Reads DB2QSTRBUFDEC19DB2DEC19V
QSTCGPAGGetpages DB2QSTGPAGDEC19DB2DEC19V
QSTCEROWRows examined (Only data rows are taken into account) DB2QSTEROWDEC19DB2DEC19V
QSTCPROWRows Processed DB2QSTPROWDEC19DB2DEC19V
QSTCSORTNumber of sorts performed for statement DB2QSTSORTDEC19DB2DEC19V
QSTCINDXNumber of index scans performed for statement DB2QSTINDXDEC19DB2DEC19V
QSTCTSCNNumber of tablespace scans performed for statement DB2QSTTSCNDEC19DB2DEC19V
QSTCPLGPNumber of parallel groups created for statement DB2QSTPLGPDEC19DB2DEC19V
QSTCWRITSynchronous Writes DB2QSTWRITDEC19DB2DEC19V
QSTCAETTime elapsed DB2QSTCAETCHAR19
QSTCSTLNThe length of the SQL Statement DB2QSTSTLNINT25INT2
QSTCSTMTStatement text DB2QSTSTMTCHAR255
QW0316TM2Time when stmt was inserted into cache - stored clock format DB2QW316TM2CHAR14
QW0316UT1Date/Time when stmt stat was updated -in stored clock format DB2QW316UT1CHAR14
QW0316UT2Date/Time when the stmt stat was updated -in external format DB2QW316UT2CHAR14
QW0316L1Length of program name DB2QW316L1INT25INT2
QW0316T1Program name DB2QW316T1CHAR128CHAR128
QW0316LXStatement Line Number DB2QW316LXINT410DB2INT4
QW0316T2Transaction name DB2QW316T2CHAR32DB2CHAR32
QW0316L3Length of user ID DB2QW316L3INT25INT2
QW0316T3User ID DB2QW316T3CHAR128CHAR128
QW0316X4User group DB2QW316X4CHAR128CHAR128
QW0316X5The value of QUALIFIER bind option DB2QW316X5CHAR128CHAR128
QW0316X6ISOLATION DB2QW316X6CHAR3DB2CHAR03
QW0316X7TCURRENTDATA DB2QW316X7CHAR3DB2CHAR03
QW0316X8TDYNAMICRULES DB2QW316X8CHAR4DB2CHAR04
QW0316X9TCURRENT DEGREE DB2QW316X9CHAR3DB2CHAR03
QW0316XATCURRENT RULES DB2QW316XACHAR3DB2CHAR03
QW0316XBTCURRENT PRECISION DB2QW316XBCHAR5DB2CHAR05
QW0316XCTWITH HOLD DB2QW316XCCHAR3DB2CHAR03
QW0316TSTimestamp: Begin of Statistics Collection DB2QM316TSCHAR16DB2CHAR16
QW0316CTAccumulated CPU Time DB2QM316CTCHAR16DB2CHAR16
QW0316W1Accumulated Wait Time for Synchronous I/O DB2QM316W1CHAR16DB2CHAR16
QW0316W2Accumulated Wait Time for Lock and Latch Req. DB2QM316W2CHAR16DB2CHAR16
QW0316W3Accumulated Wait Time for Sync. Execution Unit Switch DB2QM316W3CHAR16DB2CHAR16
QW0316W4Accumulated Wait Time for Global Locks DB2QM316W4CHAR16DB2CHAR16
QW0316W5Accumulated Wait Time for Read Activity by Another Thread DB2QM316W5CHAR16DB2CHAR16
QW0316W6Accumulated Wait Time for Write Activity by Another Thread DB2QM316W6CHAR16DB2CHAR16
QW0316W7Accumulated wait time for latch req DB2QW316W7CCHAR16
QW0316W8Accumulated wait time for page latch DB2QW316W8CCHAR16
QW0316W9Accumulated wait time for drain lock DB2QW316W9CCHAR16
RRSAFPGMProgram name DB2QW316T1CHAR128CHAR128
QW0316WAAcc. wait for drain when waiting for claims to be released DB2QW316WACCHAR16
RRSAFLENStatement Line Number DB2Q316CLXCHAR10DB2CHAR10
QW0316WBAccumulated wait time for logwriter DB2QW316WBCCHAR16
RETOEXECS 0
QW0316XEENDuser ID - Value provided on RRS (re)signon DB2QW316XECHAR16
QW0316XFWorkstation name - Value provided on RRS (re)signon DB2QW316XFCHAR18
QW0316RTRID List Not Used due to DB2 Limits Exceeded DB2QW316RTDEC19DB2DEC19V
QW0316RSRID List Not Used due to Insufficient Storage DB2QW316RSDEC19DB2DEC19V
RRSAFPGMProgram name DB2QW316T1CHAR128CHAR128
RRSAFLENStatement Line Number DB2Q316CLXCHAR10DB2CHAR10
RETOEXECSAverage rows examined(Only data rows are taken into account) DB2RETOEXECSDEC25(6) DB2DEC25V6
RPTOEXECSAverage rows processed DB2RPTOEXECSDEC25(6) DB2DEC25V6
RPTOROWEXERatio: Rows processed to rows examined of statement DB2RPTOREXCHAR26
RAETOEXECSAverage elapsed time Average elapsed timeDB2RAETOEXECSDEC19(6) DB2DEC19V6
RAETOROWSAverage elapsed time / row DB2RAETOROWSDEC19(6) DB2DEC19V6
AVGCPUAverage CPU time Average CPU timeDB2AVGCTDEC19(6) DB2DEC19V6
AVGWAITAverage wait time Average wait timeDB2AVGWDEC19(6) DB2DEC19V6
AVGSIOWAverage synchronous I/O time Average synchronous I/O timeDB2AVGW1DEC19(6) DB2DEC19V6
AVGSYIOAverage synchronous I/Os DB2XVGSYIODEC25(6) DB2DEC25V6
RIDFAILRID list failures DB2RIDFAILCHAR19
GPRPROCGetpages per rows processed Getpages per rows processedDB2GPPRPROCDEC21(2) DB2DEC21V2
RETOPROWExamined/processed Rows (Only data rows are taken into acc.) DB2RETOPROWDEC21(2) DB2DEC21V2
STATTXTStatus DB2STATTXTCHAR18DB2CHAR18
TIMWAITWait time DB2TIMWAITCHAR26
AVGLOLAAverage wait for lock/latch Average wait for lock/latchDB2AVGW2DEC19(6) DB2DEC19V6
TIMSYIOWait time for synchronous I/O DB2TIMSYIOCHAR26
AVGEUSWAverage wait for EU switch Average wait for EU switchDB2AVGW3DEC19(6) DB2DEC19V6
TIMLOLAWait time for lock/latch DB2TIMLOLACHAR26
AVGGLLOAverage wait for global lock Average wait for global lockDB2AVGW4DEC19(6) DB2DEC19V6
TIMEUSWWait time for EU switch DB2TIMEUSWCHAR26
AVGREADAverage wait for other read Average wait for other readDB2AVGW5DEC19(6) DB2DEC19V6
TIMGLLOWait time for global lock DB2TIMGLLOCHAR26
AVGWRITAverage wait for other write Average wait for other writeDB2AVGW6DEC19(6) DB2DEC19V6
TIMREADWait time for other read DB2TIMREADCHAR26
AVGLARQAverage wait time for latch req DB2AVGW7DEC19(6) DB2DEC19V6
TIMWRITWait time for other write DB2TIMWRITCHAR26
AVGPGLAAverage wait time for page latch DB2AVGW8DEC19(6) DB2DEC19V6
TIMOTHEOther wait time DB2TIMOTHECHAR26
AVGDRLOAverage wait time for drain lock DB2AVGW9DEC19(6) DB2DEC19V6
RANBTONE Average synchronous reads0
AVGCLRLAverage wait for drain when waiting for claims to be rel. DB2AVGWADEC19(6) DB2DEC19V6
RANWTONE Average synchronous writes0
AVGLOGWAverage wait time for logwriter DB2AVGWBDEC19(6) DB2DEC19V6
RANGTONE Average getpages0
AVGOTHEAverage other wait time (dec) Average other wait timeDB2AVGOTHEDDEC19(6)
RANSTONE Average sorts0
TIMCPUCPU time DB2TIMCPUCHAR26
RANITONE Average index scans0
TIMWAITWait time DB2TIMWAITCHAR26
RANTTONE Average tablespace scans0
TIMSYIOWait time for synchronous I/O DB2TIMSYIOCHAR26
RARSTONE Average RID failures - no storage0
TIMLOLAWait time for lock/latch DB2TIMLOLACHAR26
RARTTONE 0
TIMEUSWWait time for EU switch DB2TIMEUSWCHAR26
RANLTONE Average parallel groups0
TIMGLLOWait time for global lock DB2TIMGLLOCHAR26
RANGTONPGetpages per rows processed DB2NGTONPDEC25(6) DB2DEC25V6
TIMREADWait time for other read DB2TIMREADCHAR26
RANRTONPExamined/rows processed (Only data rows are taken into acc.) DB2NRTONPDEC25(6) DB2DEC25V6
TIMWRITWait time for other write DB2TIMWRITCHAR26
RAW1TOBWAverage duration of a synchronous I/O DB2W1TOBWCHAR26
TIMLARQ wait time for latch req0
EXECPSECAverage executions per second DB2EXESECDEC25(6) DB2DEC25V6
TIMPGLA wait time for page latch0
QW0316W1NAccumulated Wait Time for Synchronous I/O DB2QW316W1DEC16DB2DEC16
TIMDRLO wait time for drain lock0
QW0316W2NAccumulated Wait Time for Lock and Latch Req. DB2QW316W2DEC16DB2DEC16
TIMCLRL wait for drain when waiting for claims to be rel.0
QW0316W3NAccumulated Wait Time for Sync. Execution Unit Switch DB2QW316W3DEC16DB2DEC16
TIMLOGW wait time for logwriter0
QW0316W4NAccumulated Wait Time for Global Locks DB2QW316W4DEC16DB2DEC16
TIMOTHEOther wait time DB2TIMOTHECHAR26
QW0316W5NAccumulated Wait Time for Read Activity by Another Thread DB2QW316W5DEC16DB2DEC16
RANBTONEAverage synchronous reads Average synchronous readsDB2AVGRBUFDEC25(6) DB2DEC25V6
QW0316W6NAccumulated Wait Time for Write Activity by Another Thread DB2QW316W6DEC16DB2DEC16
RANWTONEAverage synchronous writes Average synchronous writesDB2AVGWRITEDEC25(6) DB2DEC25V6
QW0316CTNAccumulated CPU Time DB2QW316CTDEC16DB2DEC16
QSTCAETNTime elapsed DB2QSTAETDEC16DB2DEC16
RANGTONEAverage getpages Average getpagesDB2AVGGPAGDEC25(6) DB2DEC25V6
QW0316TDName of the table referenced in the statement DB2QW316TDCHAR128CHAR128
RANSTONEAverage sorts Average sortsDB2AVGSORTDEC25(6) DB2DEC25V6
MEMBNMDB2 member name in data sharing environment DB2MEMNCHAR8DB2CHAR08
RANITONEAverage index scans Average index scansDB2AVGINDXDEC25(6) DB2DEC25V6
STATUID STATUID as used by SAP BW to identify OLAP queries0
RANTTONEAverage tablespace scans Average tablespace scansDB2AVGTSCNDEC25(6) DB2DEC25V6
RARSTONEAverage RID failures - no storage Average RID failures - no storageDB2AVG316RSDEC25(6) DB2DEC25V6
RARTTONEAverage RID failures - limit DB2AVG316RTDEC25(6) DB2DEC25V6
RANLTONEAverage parallel groups Average parallel groupsDB2AVGPLGPDEC25(6) DB2DEC25V6
RANGTONPGetpages per rows processed DB2NGTONPDEC25(6) DB2DEC25V6
RANRTONPExamined/rows processed (Only data rows are taken into acc.) DB2NRTONPDEC25(6) DB2DEC25V6
RAW1TOBWAverage duration of a synchronous I/O DB2W1TOBWCHAR26
EXECPSECAverage executions per second DB2EXESECDEC25(6) DB2DEC25V6
QW0316W1NAccumulated Wait Time for Synchronous I/O DB2QW316W1DEC16DB2DEC16
QW0316W2NAccumulated Wait Time for Lock and Latch Req. DB2QW316W2DEC16DB2DEC16
QW0316W3NAccumulated Wait Time for Sync. Execution Unit Switch DB2QW316W3DEC16DB2DEC16
QW0316W4NAccumulated Wait Time for Global Locks DB2QW316W4DEC16DB2DEC16
QW0316W5NAccumulated Wait Time for Read Activity by Another Thread DB2QW316W5DEC16DB2DEC16
QW0316W6NAccumulated Wait Time for Write Activity by Another Thread DB2QW316W6DEC16DB2DEC16
QW0316W7NAccumulated wait time for latch req DB2QW316W7DEC16
QW0316W8NAccumulated wait time for page latch DB2QW316W8DEC16
QW0316W9NAccumulated wait time for drain lock DB2QW316W9DEC16
QW0316WANAcc. wait for drain when waiting for claims to be released DB2QW316WADEC16
QW0316WBNAccumulated wait time for logwriter DB2QW316WBDEC16
QW0316CTNAccumulated CPU Time DB2QW316CTDEC16DB2DEC16
QSTCAETNTime elapsed DB2QSTAETDEC16DB2DEC16
QW0316TDName of the table referenced in the statement DB2QW316TDCHAR128CHAR128
MEMBNMDB2 member name in data sharing environment DB2MEMNCHAR8DB2CHAR08
STATUID STATUID as used by SAP BW to identify OLAP queries0

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 as

SE11 (ABAP Dictionary Maintenance)
SM30 (Maintain Table Data)
SE80 (Object Navigator)
SE16 (Data Browser).


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!