Version: 7.0.0

Dynamic Views ​

DV_DSS_TIME_STATS ​

DSS device information view. It supports collecting operation statistics of DSS devices in the database, recording the wait time and execution count of each DSS operation. It can diagnose I/O bottlenecks and latency issues at the storage layer, helping DBAs identify storage performance problems such as high-latency read and write operations.

Field description:

No.Field NameData TypeDescription
0PREAD_WAIT_COUNTBINARY_BIGINTPhysical read wait count
1PREAD_WAIT_TIMEBINARY_BIGINTPhysical read wait time
2PWRITE_WAIT_COUNTBINARY_BIGINTPhysical write wait count
3PWRITE_WAIT_TIMEBINARY_BIGINTPhysical write wait time
4PREAD_SYN_META_WAIT_COUNTBINARY_BIGINTSynchronous metadata physical read wait count
5PREAD_SYN_META_WAIT_TIMEBINARY_BIGINTSynchronous metadata physical read wait time
6PWRITE_SYN_META_WAIT_COUNTBINARY_BIGINTSynchronous metadata physical write wait count
7PWRITE_SYN_META_WAIT_TIMEBINARY_BIGINTSynchronous metadata physical write wait time
8PREAD_DISK_WAIT_COUNTBINARY_BIGINTPhysical disk read wait count
9PREAD_DISK_WAIT_TIMEBINARY_BIGINTPhysical disk read wait time
10PWRITE_DISK_WAIT_COUNTBINARY_BIGINTPhysical disk write wait count
11PWRITE_DISK_WAIT_TIMEBINARY_BIGINTPhysical disk write wait time
12FOPEN_WAIT_COUNTBINARY_BIGINTWait count of file open operations
13FOPEN_WAIT_TIMEBINARY_BIGINTWait time of file open operations
14STAT_WAIT_COUNTBINARY_BIGINTWait count of obtaining file status
15STAT_WAIT_TIMEBINARY_BIGINTWait time of obtaining file status
16FIND_FT_ON_SERVER_WAIT_COUNTBINARY_BIGINTWait count of searching for file tokens on the server
17FIND_FT_ON_SERVER_WAIT_TIMEBINARY_BIGINTWait time of searching for file tokens on the server
18LOCK_VG_WAIT_COUNTBINARY_BIGINTWait count of locking volume groups
19LOCK_VG_WAIT_TIMEBINARY_BIGINTWait time of locking volume groups
20LATCH_CONTEXT_WAIT_COUNTBINARY_BIGINTLatch context wait count
21LATCH_CONTEXT_WAIT_TIMEBIGINTLatch context wait time

DV_SQL_EXECUTION ​

A view of historical execution plans for SQL statements in the database. You can query the execution plan and status information of each SQL statement historically executed in the database for SQL performance analysis and optimization, and compare the performance differences of different execution plans through historical data.

Field description:

No.Field NameData TypeDescription
0SQL_IDVARCHARUnique identifier of the SQL statement
1PLAN_VERSIONVARCHARVersion number of the execution plan
2EXECUTION_COUNTBINARY_BIGINTExecution count
3DISK_READ_COUNTBINARY_BIGINTDisk read count
4BUFFER_GET_COUNTBINARY_BIGINTBuffer get count
5CR_GET_COUNTBINARY_BIGINTConsistent read count (the number of times the SQL statement searches in the CR pool)
6SORT_COUNTBINARY_BIGINTSort count
7HARD_PARSE_TIMEBINARY_BIGINTHard parse time (microseconds)
8SOFT_PARSE_TIMEBINARY_BIGINTSoft parse time (microseconds)
9IO_WAIT_ELAPSED_TIMEBINARY_BIGINTI/O wait time (microseconds)
10CON_WAIT_ELAPSED_TIMEBINARY_BIGINTCondition wait time (microseconds)
11CPU_ELAPSED_TIMEBINARY_BIGINTCPU execution time (microseconds)
12TOTAL_ELAPSED_TIMEBINARY_BIGINTTotal execution time (microseconds)
13LAST_LOAD_TIMESTAMPDATELast load timestamp (the time of the most recent load into the library cache, generally the time of the first hard parse)
14LAST_ACTIVE_TIMESTAMPDATELast active timestamp (generally the last execution time)
15REFERENCE_COUNTBINARY_UINT32SQL reference count (the number of sessions or processes currently using this execution plan)
16MEMORY_PAGESBINARY_UINT32Number of pages occupied by the context
17SHARED_MEMORY_SIZEBINARY_BIGINTSize of occupied memory
18VM_OPEN_PAGE_COUNTBINARY_BIGINTNumber of opened VM pages
19VM_CLOSE_PAGE_COUNTBINARY_BIGINTNumber of closed VM pages
20VM_SWAPIN_PAGE_COUNTBINARY_BIGINTNumber of VM pages swapped in from disk to memory
21VM_FREE_PAGE_COUNTBINARY_BIGINTNumber of freed VM pages (used for execution)
22PLAN_TEXTVARCHARExecution plan text
23VM_MAX_OPEN_PAGE_COUNTBINARY_BIGINTMaximum number of VM pages opened by the SQL execution
24VM_SWAPOUT_PAGE_COUNTBINARY_BIGINTNumber of VM pages swapped out from memory to disk
25VM_ALLOC_PAGE_COUNTBINARY_BIGINTNumber of allocated VM pages
26SIGNATUREVARCHARExecution plan signature
27EXPLAIN_IDVARCHARExecution plan ID

DV_SLOW_SQL ​

Slow SQL view. It records slow SQL statements whose execution time exceeds the preset threshold, including key information such as SQL text, execution time, wait events, and lock waits, which can be used for performance optimization.

The slow SQL view information is obtained from slow SQL logs. Therefore, to obtain slow SQL information, you need to enable slow SQL logging:

--Enable slow SQL logging, corresponding to _LOG_LEVEL = 256
alter system set SLOWSQL_LOG_MODE=ON;
--Set the threshold for slow SQL logging, used to determine whether a SQL statement should be logged as slow
alter system set SQL_STAGE_THRESHOLD=2;
--Check the setting result
show parameter SLOWSQL_LOG_MODE;
show parameter SQL_STAGE_THRESHOLD;

Field description:

No.Field NameData TypeDescription
0TENANT_IDBINARY_UINT32Tenant ID
1CTIMEVARCHARExecution time
2STAGEVARCHARSQL execution stage
3SIDBINARY_BIGINTSession ID
4CLIENT_IPVARCHARClient IP address
5ELAPSED_TIMENUMBERTotal execution time (microseconds)
6PARAMSVARCHARSQL statement bind parameters
7SQL_IDVARCHARSQL statement ID
8EXPLAIN_IDVARCHARExecution plan ID
9DISK_READ_COUNTBINARY_BIGINTDisk read count
10BUFFER_GET_COUNTBINARY_BIGINTBuffer get count
11CR_GET_COUNTBINARY_BIGINTConsistent read count (the number of times the SQL statement searches in the CR pool)
12DIRTY_COUNTBINARY_BIGINTNumber of generated dirty pages
13PROCESSED_ROWSBINARY_BIGINTNumber of processed rows
14CPU_ELAPSED_TIMEBINARY_BIGINTCPU execution time (microseconds)
15IO_WAIT_ELAPSED_TIMEBINARY_BIGINTI/O wait time (microseconds)
16CON_WAIT_ELAPSED_TIMEBINARY_BIGINTCondition wait time (microseconds)
17PARSE_ELAPSED_TIMEBINARY_BIGINTReparse time during execution (microseconds)
18VM_ALLOC_PAGESBINARY_BIGINTNumber of allocated VM pages
19VM_MAX_OPEN_PAGE_COUNTBINARY_BIGINTMaximum number of VM pages opened
20TOP1_EVENTVARCHARLongest execution wait event
21TOP1_WAIT_TIMEBINARY_BIGINTWait time of the longest execution wait event
22TOP1_EVENT_COUNTBINARY_BIGINTOccurrence count of the longest execution wait event
23TOP2_EVENTVARCHARSecond longest execution wait event
24TOP2_WAIT_TIMEBINARY_BIGINTWait time of the second longest execution wait event
25TOP2_EVENT_COUNTBINARY_BIGINTOccurrence count of the second longest execution wait event
26TOP3_EVENTVARCHARThird longest execution wait event
27TOP3_WAIT_TIMEBINARY_BIGINTWait time of the third longest execution wait event
28TOP3_EVENT_COUNTBINARY_BIGINTOccurrence count of the third longest execution wait event
29SQL_TEXTVARCHARSQL statement text
30EXPLAIN_TEXTVARCHARExecution plan text

NOTE

  1. Only statements whose execution time exceeds the preset threshold and that are DML statements (SELECT, UPDATE, INSERT, DELETE, MERGE, REPLACE) are recorded.

  2. STAGE indicates the SQL execution stage (PREPARE / EXECUTE / PREP_EXEC / QUERY / FETCH). When a command in a certain stage of an SQL statement times out, it is recorded in the slow SQL log. When the execution time of an SQL statement times out, it is also recorded in the slow SQL log, and the recorded STAGE is EXECUTE.

DV_DRC_BUF_INFO ​

Local node buffer page view. It can monitor the buffer page usage of the local database node, display page status information, and can be used for memory management analysis, especially when lock conflicts or page conversion delays occur.

Field description:

No.Field NameData TypeDescription
0IDXBINARY_UINT32Buffer resource index
1FILE_IDBINARY_UINT32File ID
2PAGE_IDBINARY_UINT32Page ID
3CLAIMED_OWNERBINARY_UINT32Node ID held by the owner
4LOCKBINARY_UINT32Lock mode of the node held by the owner:
0: NULL
1: SHARE
2: EXCLUSIVE
5CONVERTING_INSTBINARY_UINT32ID of the converting node
6CONVERTING_CUR_LOCKVARCHARCurrent lock mode of the converting node:
NULL
SHARE
EXCLUSIVE
7CONVERTING_REQ_LOCKVARCHARLock mode requested by the converting node:
NULL
SHARE
EXCLUSIVE
8CONVERTQ_LENBINARY_UINT32Length of the request queue of the converting node
9EDP_MAPBINARY_BIGINTBitmap of nodes holding the EDP (invalid values are set to 255)
10CONVERTING_SIDBINARY_UINT32Session ID of the converting node
11CONVERTING_RSNBINARY_UINT32Serial number of the converting node
12PART_IDBINARY_UINT32ID of the associated DRC partition list
13READONLY_COPIESBINARY_BIGINTBitmap of read-only copies
14LATEST_EDPBINARY_UINT32ID of the node holding the latest EDP
15IN_RECOVERYBINARY_UINT32Whether the page is in recovery
16REFORM_PROMOTEBINARY_UINT32Whether DRC is promoted from a replica to the owner during reform
17LSNBINARY_BIGINTMaximum LSN among all EDPs of this page in the cluster
18RECOVERY_SKIPBINARY_UINT32Whether DRC skips replay during reform, that is, whether dirty pages need to be persisted and flushed to disk
19IS_RECYCLINGBINARY_UINT32Whether it is being recycled
20MASTER_IDBINARY_UINT32Master node ID

DV_DRC_LOCAL_LOCK_INFO ​

Lock information view of the local database node. It can be used to monitor lock usage on the local database node, helping identify issues such as lock contention and deadlocks.

Field description:

No.Field NameData TypeDescription
0IDXBINARY_UINT32Index of the local lock resource in the resource pool
1DRID_TYPEVARCHARResource ID type
2DRID_UIDBINARY_UINT32Resource UID
3DRID_IDBINARY_UINT32Lock ID
4DRID_IDXBINARY_UINT32Resource index ID
5DRID_PARTBINARY_UINT32Resource partition
6DRID_PARENTPARTBINARY_UINT32Resource parent partition
7IS_OWNERUINT32Whether it is the owner
8IS_LOCKEDUINT32Whether it is locked
9COUNTBINARY_UINT32Counter (table locks only)
10LATCH_SHARE_COUNTUINT32Latch share count
11LATCH_STATUINT32Latch status
12LATCH_SIDUINT32Session ID holding the latch
13IS_RELEASINGUINT32Whether the local lock is released
14LOCK_MODEUINT32Local lock mode

DV_BUF_CTRL_INFO ​

View of buffer control block information for the local database node. It can be used for buffer management and page status analysis.

Field description:

No.Field NameData TypeDescription
0POOL_IDBINARY_UINT32Buffer pool ID
1FILE_IDBINARY_UINT32Data file ID
2PAGE_IDBINARY_UINT32Page ID
3LATCH_SHARE_COUNTBINARY_UINT32Latch share count
4LATCH_STATBINARY_UINT32Latch status
5LATCH_SIDBINARY_UINT32Session ID holding the latch
6LATCH_XSIDBINARY_UINT32Session ID of the last exclusive latch holder
7IS_READONLYBINARY_UINT32Whether the page is read-only
8IS_DIRTYBINARY_UINT32Whether the page is dirty
9IS_REMOTE_DIRTYBINARY_UINT32Whether the page is remotely dirty
10IS_MARKEDBINARY_UINT32Whether the page is marked
11LOAD_STATUSBINARY_UINT32Load status:
0: BUF_NEED_LOAD
1: BUF_IS_LOADED
2: BUF_LOAD_FAILED
12IN_OLDBINARY_UINT32Whether the page is in the old list (LRU cold end)
13IN_CKPTBINARY_UINT32Whether the page is in the checkpoint queue
14LOCK_MODEBINARY_UINT32Local lock mode:
0: NULL
1: SHARE
2: EXCLUSIVE
15IS_EDPBINARY_UINT32Whether the page is an EDP
16EDP_SCNBINARY_BIGINTMost recent SCN when the local page became an EDP
17EDP_MAPBINARY_BIGINTBitmap of nodes holding the EDP
18REF_NUMBINARY_UINT32Reference count
19LASTEST_LFNBINARY_BIGINTLatest log file number
20NEED_FLUSHBINARY_BIGINTWhether flushing is required during reform (fixed to 0; buf ctrl does not need flushing)
21BEEN_LOADEDBINARY_UINT32Whether the cached page has been loaded
22IN_RECOVERYBINARY_UINT32Whether the page is being recovered during reform
23LAST_CKPT_TIMEBINARY_UINT32Time when the local EDP was last added to the EDP group
24IS_RESIDENTBINARY_UINT32Whether the page is resident in memory
25IS_PINNEDBINARY_UINT32Whether the page is pinned
26PAGE_SCNBINARY_BIGINTPage SCN