是的,这个视图来源表是__all_virtual_sql_audit这张表
CREATE TABLE __all_virtual_sql_audit
(
svr_ip
varchar(46) NOT NULL,
svr_port
bigint(20) NOT NULL,
tenant_id
bigint(20) NOT NULL,
request_id
bigint(20) NOT NULL,
trace_id
varchar(128) NOT NULL,
client_ip
varchar(46) NOT NULL,
client_port
bigint(20) NOT NULL,
tenant_name
varchar(64) NOT NULL,
effective_tenant_id
bigint(20) NOT NULL,
user_id
bigint(20) NOT NULL,
user_name
varchar(64) NOT NULL,
db_id
bigint(20) unsigned NOT NULL,
db_name
varchar(128) NOT NULL,
sql_id
varchar(32) NOT NULL,
query_sql
longtext NOT NULL,
plan_id
bigint(20) NOT NULL,
affected_rows
bigint(20) NOT NULL,
return_rows
bigint(20) NOT NULL,
partition_cnt
bigint(20) NOT NULL,
ret_code
bigint(20) NOT NULL,
qc_id
bigint(20) unsigned NOT NULL,
dfo_id
bigint(20) NOT NULL,
sqc_id
bigint(20) NOT NULL,
worker_id
bigint(20) NOT NULL,
event
varchar(64) DEFAULT NULL,
p1text
varchar(64) DEFAULT NULL,
p1
bigint(20) unsigned DEFAULT NULL,
p2text
varchar(64) DEFAULT NULL,
p2
bigint(20) unsigned DEFAULT NULL,
p3text
varchar(64) DEFAULT NULL,
p3
bigint(20) unsigned DEFAULT NULL,
level
bigint(20) DEFAULT NULL,
wait_class_id
bigint(20) DEFAULT NULL,
wait_class#
bigint(20) DEFAULT NULL,
wait_class
varchar(64) DEFAULT NULL,
state
varchar(19) DEFAULT NULL,
wait_time_micro
bigint(20) DEFAULT NULL,
total_wait_time_micro
bigint(20) DEFAULT NULL,
total_waits
bigint(20) DEFAULT NULL,
rpc_count
bigint(20) DEFAULT NULL,
plan_type
bigint(20) NOT NULL,
is_inner_sql
tinyint(4) NOT NULL,
is_executor_rpc
tinyint(4) NOT NULL,
is_hit_plan
tinyint(4) NOT NULL,
request_time
bigint(20) NOT NULL,
elapsed_time
bigint(20) NOT NULL,
net_time
bigint(20) NOT NULL,
net_wait_time
bigint(20) NOT NULL,
queue_time
bigint(20) NOT NULL,
decode_time
bigint(20) NOT NULL,
get_plan_time
bigint(20) NOT NULL,
execute_time
bigint(20) NOT NULL,
application_wait_time
bigint(20) unsigned DEFAULT NULL,
concurrency_wait_time
bigint(20) unsigned DEFAULT NULL,
user_io_wait_time
bigint(20) unsigned DEFAULT NULL,
schedule_time
bigint(20) unsigned DEFAULT NULL,
row_cache_hit
bigint(20) DEFAULT NULL,
bloom_filter_cache_hit
bigint(20) DEFAULT NULL,
block_cache_hit
bigint(20) DEFAULT NULL,
disk_reads
bigint(20) DEFAULT NULL,
execution_id
bigint(20) NOT NULL,
session_id
bigint(20) unsigned NOT NULL,
retry_cnt
bigint(20) NOT NULL,
table_scan
tinyint(4) NOT NULL,
consistency_level
bigint(20) NOT NULL,
memstore_read_row_count
bigint(20) DEFAULT NULL,
ssstore_read_row_count
bigint(20) DEFAULT NULL,
data_block_read_cnt
bigint(20) DEFAULT NULL,
data_block_cache_hit
bigint(20) DEFAULT NULL,
index_block_read_cnt
bigint(20) DEFAULT NULL,
index_block_cache_hit
bigint(20) DEFAULT NULL,
blockscan_block_cnt
bigint(20) DEFAULT NULL,
blockscan_row_cnt
bigint(20) DEFAULT NULL,
pushdown_storage_filter_row_cnt
bigint(20) DEFAULT NULL,
request_memory_used
bigint(20) NOT NULL,
expected_worker_count
bigint(20) NOT NULL,
used_worker_count
bigint(20) NOT NULL,
sched_info
varchar(16384) DEFAULT NULL,
fuse_row_cache_hit
bigint(20) DEFAULT NULL,
user_client_ip
varchar(46) NOT NULL,
ps_client_stmt_id
bigint(20) NOT NULL,
ps_inner_stmt_id
bigint(20) NOT NULL,
transaction_id
bigint(20) NOT NULL,
snapshot_version
bigint(20) unsigned NOT NULL,
snapshot_source
varchar(128) NOT NULL,
request_type
bigint(20) NOT NULL,
is_batched_multi_stmt
tinyint(4) NOT NULL,
ob_trace_info
varchar(4096) NOT NULL,
plan_hash
bigint(20) unsigned NOT NULL,
user_group
bigint(20) DEFAULT NULL,
lock_for_read_time
bigint(20) NOT NULL,
params_value
longtext NOT NULL,
rule_name
varchar(256) NOT NULL,
proxy_session_id
bigint(20) unsigned NOT NULL,
tx_internal_route_flag
bigint(20) unsigned NOT NULL,
partition_hit
tinyint(4) NOT NULL,
tx_internal_route_version
bigint(20) unsigned NOT NULL,
flt_trace_id
varchar(1024) NOT NULL,
pl_trace_id
varchar(128) DEFAULT NULL,
plsql_exec_time
bigint(20) NOT NULL,
network_wait_time
bigint(20) unsigned DEFAULT NULL,
stmt_type
varchar(128) DEFAULT NULL,
seq_num
bigint(20) NOT NULL,
total_memstore_read_row_count
bigint(20) NOT NULL,
total_ssstore_read_row_count
bigint(20) NOT NULL,
proxy_user
varchar(128) DEFAULT NULL,
format_sql_id
varchar(32) NOT NULL,
PRIMARY KEY (svr_ip
, svr_port
, tenant_id
, request_id
),
KEY all_virtual_sql_audit_i1
(tenant_id
, request_id
) STORING (trace_id
, client_ip
, client_port
, tenant_name
, effective_tenant_id
, user_id
, user_name
, db_id
, db_name
, sql_id
, query_sql
, plan_id
, affected_rows
, return_rows
, partition_cnt
, ret_code
, qc_id
, dfo_id
, sqc_id
, worker_id
, event
, p1text
, p1
, p2text
, p2
, p3text
, p3
, level
, wait_class_id
, wait_class#
, wait_class
, state
, wait_time_micro
, total_wait_time_micro
, total_waits
, rpc_count
, plan_type
, is_inner_sql
, is_executor_rpc
, is_hit_plan
, request_time
, elapsed_time
, net_time
, net_wait_time
, queue_time
, decode_time
, get_plan_time
, execute_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
, execution_id
, session_id
, retry_cnt
, table_scan
, consistency_level
, memstore_read_row_count
, ssstore_read_row_count
, data_block_read_cnt
, data_block_cache_hit
, index_block_read_cnt
, index_block_cache_hit
, blockscan_block_cnt
, blockscan_row_cnt
, pushdown_storage_filter_row_cnt
, request_memory_used
, expected_worker_count
, used_worker_count
, sched_info
, fuse_row_cache_hit
, user_client_ip
, ps_client_stmt_id
, ps_inner_stmt_id
, transaction_id
, snapshot_version
, snapshot_source
, request_type
, is_batched_multi_stmt
, ob_trace_info
, plan_hash
, user_group
, lock_for_read_time
, params_value
, rule_name
, proxy_session_id
, tx_internal_route_flag
, partition_hit
, tx_internal_route_version
, flt_trace_id
, pl_trace_id
, plsql_exec_time
, network_wait_time
, stmt_type
, seq_num
, total_memstore_read_row_count
, total_ssstore_read_row_count
, proxy_user
, format_sql_id
) BLOCK_SIZE 16384 LOCAL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = ‘none’ REPLICA_NUM = 3 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 10
partition by list columns(svr_ip, svr_port)
(partition p0
values in (DEFAULT))