【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】5.7.25-OceanBase_CE-v4.0.0.0
做一次表的全表扫描,但是在oceanbase.gv$OB_SQL_AUDIT中看到的DISK_READS,DATA_BLOCK_READ_CNT,DATA_BLOCK_CACHE_HIT等均为0,应该怎么样才能正常显示呢?
obclient [tpch1]> explain extended pretty_color select sum(c_acctbal) from customer where c_comment = 'seq2';
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Plan signature: 10892131842833082527
========================================================
|ID|OPERATOR |NAME |EST. ROWS|COST |
--------------------------------------------------------
|0 |SCALAR GROUP BY | |1 |121388|
|1 | PX COORDINATOR | |1 |121388|
|2 | EXCHANGE OUT DISTR |:EX10000|1 |121388|
|3 | MERGE GROUP BY | |1 |121387|
|4 | PX PARTITION ITERATOR| |2 |121387|
|5 | TABLE SCAN |customer|2 |121387|
========================================================
Outputs & filters:
-------------------------------------
0 - output([T_FUN_SUM(T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0))(0x7fcad6ca6b10)]), filter(nil), rowset=256,
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0))(0x7fcad6ca6b10)])
1 - output([T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0)]), filter(nil), rowset=256
2 - output([T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0)]), filter(nil), rowset=256, dop=1
3 - output([T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0)]), filter(nil), rowset=256,
group(nil), agg_func([T_FUN_SUM(customer.c_acctbal(0x7fcad6c3cea0))(0x7fcad6c3c7e0)])
4 - output([customer.c_acctbal(0x7fcad6c3cea0)]), filter(nil), rowset=256,
force partition granule.
5 - output([customer.c_acctbal(0x7fcad6c3cea0)]), filter([customer.c_comment(0x7fcad6c3c270) = 'seq2'(0x7fcad6c3bb90)]), rowset=256,
access([customer.c_comment(0x7fcad6c3c270)], [customer.c_acctbal(0x7fcad6c3cea0)]), partitions(p[0-7]),
is_index_back=false, filter_before_indexback[false],
range_key([customer.c_custkey(0x7fcad6c3b2e0)]), range(MIN ; MAX)always true
Used Hint:
-------------------------------------
/*+
*/
Qb name trace:
-------------------------------------
stmt_id:0, stmt_type:T_EXPLAIN
stmt_id:1, SEL$1
Outline Data:
-------------------------------------
/*+
BEGIN_OUTLINE_DATA
GBY_PUSHDOWN(@"SEL$1")
FULL(@"SEL$1" "tpch1"."customer"@"SEL$1")
OPTIMIZER_FEATURES_ENABLE('4.0.0.0')
END_OUTLINE_DATA
*/
Plan Type:
-------------------------------------
DISTRIBUTED
Optimization Info:
-------------------------------------
customer:table_rows:1500000, physical_range_rows:1500000, logical_range_rows:1500000, index_back_rows:0, output_rows:1, est_method:basic_stat, optimization_method=cost_based, avaiable_index_name[customer], pruned_index_name[customer_idx1]
Parameters:
-------------------------------------
|
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.002 sec)
obclient [tpch1]> select sum(c_acctbal) from customer where c_comment = 'seq2';
+----------------+
| sum(c_acctbal) |
+----------------+
| NULL |
+----------------+
1 row in set (0.098 sec)
obclient [tpch1]> select QUERY_SQL,IS_INNER_SQL,AFFECTED_ROWS,RETURN_ROWS,ROW_CACHE_HIT,BLOOM_FILTER_CACHE_HIT,BLOCK_CACHE_HIT,DISK_READS,TABLE_SCAN,DATA_BLOCK_READ_CNT,DATA_BLOCK_CACHE_HIT,INDEX_BLOCK_READ_CNT,INDEX_BLOCK_CACHE_HIT,BLOCKSCAN_BLOCK_CNT,BLOCKSCAN_ROW_CNT from oceanbase.gv$OB_SQL_AUDIT where QUERY_SQL like '%seq2%' \G
*************************** 1. row ***************************
QUERY_SQL: explain extended pretty_color select sum(c_acctbal) from customer where c_comment = 'seq2'
IS_INNER_SQL: 0
AFFECTED_ROWS: 0
RETURN_ROWS: 1
ROW_CACHE_HIT: 0
BLOOM_FILTER_CACHE_HIT: 0
BLOCK_CACHE_HIT: 0
DISK_READS: 0
TABLE_SCAN: 0
DATA_BLOCK_READ_CNT: 0
DATA_BLOCK_CACHE_HIT: 0
INDEX_BLOCK_READ_CNT: 0
INDEX_BLOCK_CACHE_HIT: 0
BLOCKSCAN_BLOCK_CNT: 0
BLOCKSCAN_ROW_CNT: 0
*************************** 2. row ***************************
QUERY_SQL: select sum(c_acctbal) from customer where c_comment = 'seq2'
IS_INNER_SQL: 0
AFFECTED_ROWS: 0
RETURN_ROWS: 1
ROW_CACHE_HIT: 0
BLOOM_FILTER_CACHE_HIT: 0
BLOCK_CACHE_HIT: 0
DISK_READS: 0
TABLE_SCAN: 1
DATA_BLOCK_READ_CNT: 0
DATA_BLOCK_CACHE_HIT: 0
INDEX_BLOCK_READ_CNT: 0
INDEX_BLOCK_CACHE_HIT: 0
BLOCKSCAN_BLOCK_CNT: 0
BLOCKSCAN_ROW_CNT: 0
2 rows in set (0.001 sec)