查询的结果:
| 3226018355 | ocp_monitor | sys | 127.0.0.1:43192 | oceanbase | Query | 65D3F5BF2B8448B0CFDD69684B19BBEE | 0.057241 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) / time_to_usec(now()) as collect_time, tenant_id, db_id, plan_id, outline_id, avg_exe_usec, slowest_exe_usec, slow_count, hit_count, executions, disk_reads, direct_writes, buffer_gets, application_wait_time, concurrency_wait_time, user_io_wait_time, rows_processed, elapsed_time, cpu_time, large_querys, delayed_large_querys, table_scan, timeout_count, time_to_usec(first_load_time) as first_load_time, sql_id, type, plan_hash, schema_version, 0 as merged_version, plan_size, outline_data, query_sql from V$OB_PLAN_CACHE_PLAN_STAT where (unix_timestamp(now()) - unix_timestamp(last_active_time)) < 243600 and tenant_id = 1041 and plan_id > 114463and object_type = ‘sql_plan’ order by plan_id limit 4000 | 10.252.210.150 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 3724495 | NULL | YB420AFCD296-0006343127DFFD26-0-0 | | 0.057311 | 0 | 0 | | | | 1 | 286 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 43192 | | NULL | 0.057567 |
| 3222383380 | ocp_monitor | sys | 127.0.0.1:39132 | oceanbase | Query | 923D949AF30C198C39816EF7AFFF6975 | 0.113427 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) / sql_id, statement from V$OB_PLAN_CACHE_PLAN_STAT
where svr_ip = ‘10.252.210.163’ and svr_port = 2882 and sql_id = ‘98321C13F557E6241FB3BC79BAAE0180’ | 10.252.210.163 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 2946115 | NULL | YB420AFCD2A3-00062C51A558CB9C-0-0 | | 0.113471 | 0 | 0 | | | | 1 | 369 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 39132 | | NULL | 0.114418 |
| 3223370493 | ocp_monitor | sys | 127.0.0.1:13046 | oceanbase | Query | B7220EB263020F060EF060DD2792BDC5 | 0.07453 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) / distinct sql_id, statement from V$OB_PLAN_CACHE_PLAN_STAT
where svr_ip = ‘10.252.210.156’ and svr_port = 2882 and sql_id in (‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’) | 10.252.210.156 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 3216175 | NULL | YB420AFCD29C-000631129097842E-0-0 | | 0.074604 | 0 | 0 | | | | 1 | 142 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 13046 | | NULL | 0.087575 |
| 3221979193 | ocp_monitor | sys | 10.252.158.68:57084 | oceanbase | Query | 27644E0EB1E297E628E1032986601197 | 2.126029 | ACTIVE | select I.index_name, I.index_type, I.uniqueness, I.status, I.table_owner, group_concat(C.column_name order by column_position separator ‘,’) as column_name from cdb_indexes I left join cdb_ind_columns C on I.table_owner = C.table_owner and I.table_name = C.table_name and I.index_name = C.index_name and I.con_id = C.con_id where I.con_id = 1080and I.table_owner = ‘ncms_jx’ and I.table_name = ‘ele_accrual_billamount’ and I.status = ‘VALID’ group by index_name | 10.252.210.165 | 2882 | 2881 | NULL | NULL | 10.252.158.68 | % | 0 | 775888 | NULL | YB420AFCD2A5-00062CA932D91E0A-0-0 | | 2.126084 | 0 | 0 | | | | 1 | 701066 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 434 | 0 | 57084 | | NULL | 2.126265 |
| 3225824270 | ocp_monitor | sys | 127.0.0.1:56810 | oceanbase | Query | B7220EB263020F060EF060DD2792BDC5 | 0.125154 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) / distinct sql_id, statement from V$OB_PLAN_CACHE_PLAN_STAT
where svr_ip = ‘10.252.210.172’ and svr_port = 2882 and sql_id in (‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘0CAEAD5E6ED70B0145A9096C88C31DF6’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’, ‘5E5C065BF37472A85B7A3F45B73E16F1’) | 10.252.210.172 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 1505512 | NULL | YB420AFCD2AC-000632B6C1753DAF-0-0 | | 0.125223 | 0 | 0 | | | | 1 | 120 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 56810 | | NULL | 0.13905 |
| 3225823291 | ocp_monitor | sys | 127.0.0.1:56806 | oceanbase | Query | 201D9ED0465032D54BCDC648C5701EBB | 0.002911 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) / ifnull(max(request_id), 0) from v$sql_plan_monitor
where con_id = 1103 | 10.252.210.172 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 1505526 | NULL | YB420AFCD2AC-000632B6C1C53D8E-0-0 | | 0.002999 | 0 | 0 | | | | 1 | 273 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 56806 | | NULL | 0.003303 |
| 3225825844 | ocp_monitor | sys | 127.0.0.1:56818 | oceanbase | Query | 541A86125E22C2FD8708EA4CF099091F | 0.035492 | ACTIVE | select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) */ ifnull(max(request_id), 0) max_request_id, ifnull(min(request_id), 0) min_request_id from (select request_id from v$sql_plan_monitor
where (unix_timestamp(first_refresh_time) *1000000) >= 1744791819000000 and (unix_timestamp(first_refresh_time) 1000000) < 1744791879000000 and request_id > 0 and con_id = 1040 order by request_id limit 4000) t | 10.252.210.172 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 1505528 | NULL | YB420AFCD2AC-000632B6C1D53D85-0-0 | | 0.03559 | 0 | 0 | | | | 1 | 274 | 1 | 1 | 1 | 10 |SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 56818 | | NULL | 0.04607 |
| 3225322719 | ocp_monitor | sys | 127.0.0.1:52066 | oceanbase | Query | 8B22D2484ECE7D89B2641D9E852CE9A4 | 0.000436 | ACTIVE |
select /+ MONITOR_AGENT QUERY_TIMEOUT(10000000) */
svr_ip,
sql_id,
tenant_id,
tenant_name,
user_id,
user_name,
db_id,
db_name,
plan_id,
trace_id,
sid,
client_ip,
client_port,
user_client_ip,
request_time,
request_id,
elapsed_time,
execute_time,
total_wait_time_micro,
wait_time_micro,
get_plan_time,
affected_rows,
return_rows,
partition_cnt,
ret_code,
(case when ret_code = 0 then 0 else 1 end) as fail_count,
(case when ret_code = -4012 then 1 else 0 end) as ret_code_4012_count,
(case when ret_code = -4013 then 1 else 0 end) as ret_code_4013_count,
(case when ret_code = -5001 then 1 else 0 end) as ret_code_5001_count,
(case when ret_code = -5024 then 1 else 0 end) as ret_code_5024_count,
(case when ret_code = -5167 then 1 else 0 end) as ret_code_5167_count,
(case when ret_code = -5217 then 1 else 0 end) as ret_code_5217_count,
(case when ret_code = -6002 then 1 else 0 end) as ret_code_6002_count,
event,
p1,
p2,
p3,
p1text,
p2text,
p3text,
(case event when ‘system internal wait’ then wait_time_micro else 0 end) as event_0_wait_time,
(case event when ‘mysql response wait client’ then wait_time_micro else 0 end) as event_1_wait_time,
(case event when ‘sync rpc’ then wait_time_micro else 0 end) as event_2_wait_time,
(case event when ‘db file data read’ then wait_time_micro else 0 end) as event_3_wait_time,
total_waits,
rpc_count,
plan_type,
(case when plan_type=1 then 1 else 0 end) as plan_type_local_count,
(case when plan_type=2 then 1 else 0 end) as plan_type_remote_count,
(case when plan_type=3 then 1 else 0 end) as plan_type_dist_count,
is_inner_sql,
is_executor_rpc,
is_hit_plan,
consistency_level,
(case when is_inner_sql=1 then 1 else 0 end) as inner_sql_count,
(case when is_executor_rpc = 1 then 1 else 0 end) as executor_rpc_count,
(case when is_hit_plan=1 then 0 else 1 end) as miss_plan_count,
(case consistency_level when 3 then 1 else 0 end) as consistency_level_strong,
(case consistency_level when 2 then 1 else 0 end) as consistency_level_weak,
net_time,
net_wait_time,
queue_time,
decode_time,
application_wait_time,
concurrency_wait_time,
user_io_wait_time,
schedule_time,
row_cache_hit,
bloom_filter_cache_hit,
block_cache_hit,
disk_reads,
retry_cnt,
table_scan,
memstore_read_row_count,
ssstore_read_row_count,
query_sql, 0 as block_index_cache_hit, expected_worker_count, used_worker_count, request_memory_used, tx_id as transaction_hash, effective_tenant_id, params_value, flt_trace_id from V$OB_SQL_AUDIT
where request_id = 539839246 and tenant_id = 1062 | 10.252.210.168 | 2882 | 2881 | NULL | NULL | 127.0.0.1 | % | 0 | 2548163 | NULL | YB420AFCD2A8-0006326D36990829-0-0 | | 0.000504 | 0 | 0 | | | | 1 | 368 | 1 | 1 | 1 | 10 | SAMPLE_AND_SLOW_QUERY | NULL | NULL | NULL | 101 | 0 | 52066 | | NULL | 0.000744 |