文章目录
性能分析
SQL如下:
SELECT `type`,event_time,query_duration_ms,read_rows,read_bytes,result_rows,result_bytes,
memory_usage,query,query_id,`exception`,
arrayJoin(arrayZip(`ProfileEvents.Names`, `ProfileEvents.Values`))
,toString(thread_ids)
from remote('ch0{1..9}-xxx,ch1{0..9}-xxx,ch2{0..4}-xxx', 'system', 'query_log')
where
query like '%new_users%' and query not like '%query_log%'
-- and is_initial_query='1'
and event_time > toDateTime('2021-02-04 16:10:00')
order by event_time desc