mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 11:04:10 +00:00
99528e296c
$ gg -e need_data_ -e port_full_ | cut -d: -f1 | sort -u | xargs sed -i -e s/port_full_/output_wait_/g -e s/need_data_/input_wait_/g -e s/getPortFull/getOutputWait/g -e s/getNeedData/getInputWait/g Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
-- { echo }
|
|
EXPLAIN PIPELINE SELECT sleep(1);
|
|
(Expression)
|
|
ExpressionTransform
|
|
(SettingQuotaAndLimits)
|
|
(ReadFromStorage)
|
|
SourceFromSingleChunk 0 → 1
|
|
SELECT sleep(1) SETTINGS log_processors_profiles=true, log_queries=1, log_queries_min_type='QUERY_FINISH';
|
|
0
|
|
SYSTEM FLUSH LOGS;
|
|
WITH
|
|
(
|
|
SELECT query_id
|
|
FROM system.query_log
|
|
WHERE current_database = currentDatabase() AND Settings['log_processors_profiles']='1'
|
|
) AS query_id_
|
|
SELECT
|
|
name,
|
|
multiIf(
|
|
-- ExpressionTransform executes sleep(),
|
|
-- so IProcessor::work() will spend 1 sec.
|
|
name = 'ExpressionTransform', elapsed_us>1e6,
|
|
-- SourceFromSingleChunk, that feed data to ExpressionTransform,
|
|
-- will feed first block and then wait in PortFull.
|
|
name = 'SourceFromSingleChunk', output_wait_elapsed_us>1e6,
|
|
-- NullSource/LazyOutputFormatLazyOutputFormat are the outputs
|
|
-- so they cannot starts to execute before sleep(1) will be executed.
|
|
input_wait_elapsed_us>1e6)
|
|
elapsed
|
|
FROM system.processors_profile_log
|
|
WHERE query_id = query_id_
|
|
ORDER BY name;
|
|
ExpressionTransform 1
|
|
LazyOutputFormat 1
|
|
LimitsCheckingTransform 1
|
|
NullSource 1
|
|
NullSource 1
|
|
SourceFromSingleChunk 1
|