SHOW-QUERY-PROFILE
SHOW-QUERY-PROFILEβ
Nameβ
SHOW QUERY PROFILE
Descriptionβ
This statement is used to view the tree profile information of the query operation,this function requires the user to open profile settings. Before versions 0.15, perform the following settings:
SET is_report_success=true;
For versions 0.15 and later, perform the following settings:
SET [GLOBAL] enable_profile=true;
grammar:
show query profile "/";
This command will list the profiles of all currently saved query operations.
show query profile "/queryId"\G
show query profile "/queryId/fragment_id/instance_id"\G
Get the tree profile information of the specified query ID,Return to profile simple tree.Specify fragment_ ID and instance_ ID returns the corresponding detailed profile tree.
Exampleβ
-
List all query Profile
mysql> show query profile "/";
+-----------------------------------+------+-------------------------+--------------------+-----------+---------------------+---------------------+-----------+------------+
| QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState |
+-----------------------------------+------+-------------------------+--------------------+-----------+---------------------+---------------------+-----------+------------+
| 327167e0db4749a9-adce3b3d770b2bb1 | root | default_cluster:test_db | select * from test | Query | 2022-08-09 10:50:09 | 2022-08-09 10:50:09 | 19ms | EOF |
+-----------------------------------+------+-------------------------+--------------------+-----------+---------------------+---------------------+-----------+------------+
1 row in set (0.00 sec) -
List the query profile of the specified queryid
mysql> show query profile "/327167e0db4749a9-adce3b3d770b2bb1"\G
*************************** 1. row ***************************
Fragments: ββββββββββββββββββββββββββ
β[-1: VDataBufferSender] β
βFragment: 0 β
βMaxActiveTime: 783.263usβ
ββββββββββββββββββββββββββ
ββ
β
βββββββββββββββββββββ
β[1: VEXCHANGE_NODE]β
βFragment: 0 β
βββββββββββββββββββββ
ββ
β
ββββββββββββββββββββββββββ
β[1: VDataStreamSender] β
βFragment: 1 β
βMaxActiveTime: 847.612usβ
ββββββββββββββββββββββββββ
β
β
ββββββββββββββββββββββ
β[0: VOLAP_SCAN_NODE]β
βFragment: 1 β
ββββββββββββββββββββββ
ββ
β
βββββββββββββββ
β[OlapScanner]β
βFragment: 1 β
βββββββββββββββ
β
β
βββββββββββββββββββ
β[SegmentIterator]β
βFragment: 1 β
βββββββββββββββββββ
1 row in set (0.00 sec) -
Lists the instance profile of the specified fragment:
mysql> show query profile "/327167e0db4749a9-adce3b3d770b2bb1/1/"\G
*************************** 1. row ***************************
Instances: 327167e0db4749a9-adce3b3d770b2bb2
Host: 172.26.0.1:9111
ActiveTime: 847.612us
1 row in set (0.01 sec) -
Continue to view the detailed profile of each operator on a specific instance:
mysql> show query profile "/327167e0db4749a9-adce3b3d770b2bb1/1/327167e0db4749a9-adce3b3d770b2bb2"\G
*************************** 1. row ***************************
Instance: βββββββββββββββββββββββββββββββββββββββββ
β[1: VDataStreamSender] β
β(Active: 36.944us, non-child: 0.20) β
β - Counters: β
β - BytesSent: 0.00 β
β - IgnoreRows: 0 β
β - LocalBytesSent: 20.00 B β
β - OverallThroughput: 0.0 /sec β
β - PeakMemoryUsage: 0.00 β
β - SerializeBatchTime: 0ns β
β - UncompressedRowBatchSize: 0.00 β
βββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββββ
β[0: VOLAP_SCAN_NODE] β
β(Active: 563.241us, non-child: 3.00) β
β - Counters: β
β - BatchQueueWaitTime: 444.714us β
β - BytesRead: 37.00 B β
β - NumDiskAccess: 1 β
β - NumScanners: 2 β
β - PeakMemoryUsage: 320.00 KB β
β - RowsRead: 4 β
β - RowsReturned: 4 β
β - RowsReturnedRate: 7.101K /sec β
β - ScannerBatchWaitTime: 206.40us β
β - ScannerSchedCount : 2 β
β - ScannerWorkerWaitTime: 34.640usβ
β - TabletCount : 2 β
β - TotalReadThroughput: 0.0 /sec β
βββββββββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββ
β[OlapScanner] β
β(Active: 0ns, non-child: 0.00) β
β - Counters: β
β - BlockConvertTime: 0ns β
β - BlockFetchTime: 183.741usβ
β - ReaderInitTime: 180.741usβ
β - RowsDelFiltered: 0 β
β - RowsPushedCondFiltered: 0β
β - ScanCpuTime: 388.576us β
β - ScanTime: 0ns β
β - ShowHintsTime_V1: 0ns β
βββββββββββββββββββββββββββββββββββ
β
β
βββββββββββββββββββββββββββββββββββββββ
β[SegmentIterator] β
β(Active: 0ns, non-child: 0.00) β
β - Counters: β
β - BitmapIndexFilterTimer: 124nsβ
β - BlockLoadTime: 179.202us β
β - BlockSeekCount: 5 β
β - BlockSeekTime: 18.792us β
β - BlocksLoad: 4 β
β - CachedPagesNum: 2 β
β - CompressedBytesRead: 0.00 β
β - DecompressorTimer: 0ns β
β - IOTimer: 0ns β
β - IndexLoadTime_V1: 0ns β
β - NumSegmentFiltered: 0 β
β - NumSegmentTotal: 2 β
β - RawRowsRead: 4 β
β - RowsBitmapIndexFiltered: 0 β
β - RowsBloomFilterFiltered: 0 β
β - RowsConditionsFiltered: 0 β
β - RowsKeyRangeFiltered: 0 β
β - RowsStatsFiltered: 0 β
β - RowsVectorPredFiltered: 0 β
β - TotalPagesNum: 2 β
β - UncompressedBytesRead: 0.00 β
β - VectorPredEvalTime: 0ns β
βββββββββββββββββββββββββββββββββββββββ
1 row in set (0.01 sec)
Keywordsβ
SHOW, QUERY, PROFILE