Querying Tables Related to Parallel Query Information Monitoring
Table INFORMATION_SCHEMA.KOVAE_THREADS_LIST
The INFORMATION_SCHEMA.KOVAE_THREADS_LIST table is used to query the thread usage of the current parallel query.
Field |
Field Type |
Description |
|---|---|---|
Id |
int |
Unique ID of a session connection, which corresponds to the ID column in processlist |
type |
varchar |
Thread type. Currently, the main and worker types are supported:
|
User |
varchar |
User name of a session connection |
Host |
varchar |
IP address and port number of the client connected to the session |
Command |
varchar |
Command that is being executed by a session connection |
ThreadId |
int |
Thread ID, corresponding to the thread ID on the OS |
Time |
int |
Statistics about the thread running time, in milliseconds In parallel queries, if the record in the current row is the main thread of the session connection, the total running time of all worker threads in the session is displayed. If the record in the current row is the worker thread of the session connection, the running time of that worker thread is displayed. |
Table INFORMATION_SCHEMA.KOVAE_MEMORY_ACTIVE
The INFORMATION_SCHEMA.KOVAE_MEMORY_ACTIVE table is used to query the memory usage of the session where parallel queries are being executed.
Column Name |
Data Type |
Description |
|---|---|---|
SESSION_ID |
MYSQL_TYPE_LONG |
Session ID |
SQL |
MYSQL_TYPE_STRING |
SQL statement |
TIMESTAMP |
MYSQL_TYPE_TIME |
Timestamp |
OPERATOR_ID |
MYSQL_TYPE_LONG |
Operator ID |
OPERATOR |
MYSQL_TYPE_STRING |
Execution operator |
USED_MEMORY |
MYSQL_TYPE_LONGLONG |
Size of the used memory |
PEAK_MEMORY |
MYSQL_TYPE_LONGLONG |
Peak memory size |
Table INFORMATION_SCHEMA.KOVAE_MEMORY_HISTORY
The INFORMATION_SCHEMA.KOVAE_MEMORY_HISTORY table records the memory usage information that is queried recently. The value of kovae_memory_save_num is the number of queried records.
Column Name |
Data Type |
Description |
|---|---|---|
SESSION_ID |
MYSQL_TYPE_LONG |
Session ID |
SQL |
MYSQL_TYPE_STRING |
SQL statement |
TIMESTAMP |
MYSQL_TYPE_TIME |
Timestamp |
OPERATOR_ID |
MYSQL_TYPE_LONG |
Operator ID |
OPERATOR |
MYSQL_TYPE_STRING |
Execution operator |
USED_MEMORY |
MYSQL_TYPE_LONGLONG |
Memory size when the execution ends |
PEAK_MEMORY |
MYSQL_TYPE_LONGLONG |
Peak memory size |
Table INFORMATION_SCHEMA.KOVAE_STATEMENT_HISTORY
The INFORMATION_SCHEMA.KOVAE_STATEMENT_HISTORY table displays the SQL statements that have been executed in KOVAE. The maximum number of rows that can be displayed is specified by kovae_statement_history_schema_size.
Column Name |
Data Type |
Description |
|---|---|---|
SESSION_ID |
MYSQL_TYPE_LONGLONG |
Session ID of the current query (ID of the session thread) |
QUERY_ID |
MYSQL_TYPE_LONGLONG |
SQL statement ID of the current query |
USER |
MYSQL_TYPE_STRING |
User name of the current query |
HOST |
MYSQL_TYPE_STRING |
IP address and port number of the current query |
QUERY_STATEMENT |
MYSQL_TYPE_STRING |
SQL information of the current query |
TIMER_START |
MYSQL_TYPE_LONGLONG |
Start timestamp of the current query (from 1970-01-01 00:00:00 to the query start time, in nanoseconds) |
TIMER_END |
MYSQL_TYPE_LONGLONG |
End timestamp of the current query (from 1970-01-01 00:00:00 to the query end time, in nanoseconds) |
Table INFORMATION_SCHEMA.KOVAE_THREADS_HISTORY
The INFORMATION_SCHEMA.KOVAE_THREADS_HISTORY table displays the used worker threads (WORKER_THREAD_ID) during the parallel execution of the SQL statement (QUERY_ID) in KOVAE. The maximum number of rows that can be displayed is the value of kovae_threads_history_schema_size.
The KOVAE_STATEMENT_HISTORY table is associated with the KOVAE_THREADS_HISTORY table through QUERY_ID to obtain the start time and end time of each worker thread during the SQL statement execution.
Column Name |
Data Type |
Description |
|---|---|---|
QUERY_ID |
MYSQL_TYPE_LONGLONG |
SQL statement ID of the current query |
WORKER_THREAD_ID |
MYSQL_TYPE_LONGLONG |
Worker thread ID of the current query |
TIMER_START |
MYSQL_TYPE_LONGLONG |
Start timestamp of the worker thread execution in the current query (from 1970-01-01 00:00:00 to the query start time, in nanoseconds) |
TIMER_END |
MYSQL_TYPE_LONGLONG |
End timestamp of the worker thread execution in the current query (from 1970-01-01 00:00:00 to the query end time, in nanoseconds) |
Table INFORMATION_SCHEMA.KOVAE_MEMORY_DETAIL_HISTORY
The INFORMATION_SCHEMA.KOVAE_MEMORY_DETAIL_HISTORY table displays to answer the three questions: During the parallel execution of the SQL statement (QUERY_ID) in KOVAE, which worker threads (WORKER_THREAD_ID) request or release what amount of memory in which modules? The maximum number of rows that can be displayed is the value of kovae_memory_detail_history_schema_size. Based on the time value and number of bytes of the operation, the memory usage trend curve of the SQL statement execution in KOVAE can be obtained.
Column Name |
Data Type |
Description |
|---|---|---|
QUERY_ID |
MYSQL_TYPE_LONGLONG |
SQL statement ID of the current operation |
WORKER_THREAD_ID |
MYSQL_TYPE_LONGLONG |
Worker thread ID of the current operation |
SOURCE |
MYSQL_TYPE_STRING |
Module for the current operation, the phase name or operator name of the SQL statement execution in KOVAE |
OPERATE |
MYSQL_TYPE_STRING |
Operation type (malloc: request for memory; free: release memory) |
POINTER |
MYSQL_TYPE_LONGLONG |
Identifier value of the memory handle in the current operation |
NUMBER_OF_BYTES |
MYSQL_TYPE_LONGLONG |
Number of bytes in the memory of the current operation |
TIMER_STAMP |
MYSQL_TYPE_LONGLONG |
Timestamp of the current operation (from 1970-01-01 00:00:00 to the operation time, in nanoseconds) |
Table INFORMATION_SCHEMA.KOVAE_BUFFER_DETAIL_HISTORY
The INFORMATION_SCHEMA.KOVAE_BUFFER_DETAIL_HISTORY table displays to answer the three questions: During the parallel execution of the SQL statement (QUERY_ID) in KOVAE, which worker threads (WORKER_THREAD_ID) in which modules occupy what amount of cache (key cache concerned by the service, such as the sorting cache of the Sort operator and the hash cache of HashAgg, HashJoin, and Material)? The maximum number of rows that can be displayed is the value of kovae_buffer_detail_history_schema_size.
Column Name |
Data Type |
Description |
|---|---|---|
QUERY_ID |
MYSQL_TYPE_LONGLONG |
SQL statement ID of the current operation |
WORKER_THREAD_ID |
MYSQL_TYPE_LONGLONG |
Worker thread ID of the current operation |
SOURCE |
MYSQL_TYPE_STRING |
Module for the current operation, the phase name or operator name of the SQL statement execution in KOVAE |
OPERATE |
MYSQL_TYPE_STRING |
Operation type |
POINTER |
MYSQL_TYPE_LONGLONG |
Identifier value of the cache handle in the current operation |
NUMBER_OF_BYTES |
MYSQL_TYPE_LONGLONG |
Number of bytes in the cache of the current operation |
TIMER_STAMP |
MYSQL_TYPE_LONGLONG |
Timestamp of the current operation (from 1970-01-01 00:00:00 to the operation time, in nanoseconds) |
Procedure
- Log in to the MySQL service through the MySQL client.
- Check the INFORMATION_SCHEMA table. Use the INFORMATION_SCHEMA.KOVAE_THREADS_LIST table as an example:
1select * from information_schema.KOVAE_THREADS_LIST;