column placeholder for query_response_time_histogram
This commit is contained in:
@ -183,6 +183,12 @@ int ObInfoSchemaQueryResponseTimeTable::process_row_data(ObNewRow *&row, ObObj*
|
|||||||
cells[cell_idx].set_int(time_collector_->total(utility_iter_));
|
cells[cell_idx].set_int(time_collector_->total(utility_iter_));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SQL_TYPE: {
|
||||||
|
// unused
|
||||||
|
cells[cell_idx].set_varchar("");
|
||||||
|
cells[cell_idx].set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
SERVER_LOG(WARN, "invalid column id", K(ret), K(cell_idx), K(output_column_ids_), K(col_id));
|
SERVER_LOG(WARN, "invalid column id", K(ret), K(cell_idx), K(output_column_ids_), K(col_id));
|
||||||
|
|||||||
@ -59,7 +59,8 @@ private:
|
|||||||
SVR_PORT,
|
SVR_PORT,
|
||||||
QUERY_RESPPONSE_TIME,
|
QUERY_RESPPONSE_TIME,
|
||||||
COUNT,
|
COUNT,
|
||||||
TOTAL
|
TOTAL,
|
||||||
|
SQL_TYPE
|
||||||
};
|
};
|
||||||
common::ObAddr* addr_;
|
common::ObAddr* addr_;
|
||||||
common::ObString ipstr_;
|
common::ObString ipstr_;
|
||||||
|
|||||||
@ -7763,7 +7763,7 @@ int ObInnerTableSchema::all_virtual_query_response_time_schema(ObTableSchema &ta
|
|||||||
ObIntType, //column_type
|
ObIntType, //column_type
|
||||||
CS_TYPE_INVALID, //column_collation_type
|
CS_TYPE_INVALID, //column_collation_type
|
||||||
sizeof(int64_t), //column_length
|
sizeof(int64_t), //column_length
|
||||||
14, //column_precision
|
20, //column_precision
|
||||||
0, //column_scale
|
0, //column_scale
|
||||||
false, //is_nullable
|
false, //is_nullable
|
||||||
false, //is_autoincrement
|
false, //is_autoincrement
|
||||||
@ -7782,7 +7782,7 @@ int ObInnerTableSchema::all_virtual_query_response_time_schema(ObTableSchema &ta
|
|||||||
ObIntType, //column_type
|
ObIntType, //column_type
|
||||||
CS_TYPE_INVALID, //column_collation_type
|
CS_TYPE_INVALID, //column_collation_type
|
||||||
sizeof(int64_t), //column_length
|
sizeof(int64_t), //column_length
|
||||||
14, //column_precision
|
20, //column_precision
|
||||||
0, //column_scale
|
0, //column_scale
|
||||||
false, //is_nullable
|
false, //is_nullable
|
||||||
false, //is_autoincrement
|
false, //is_autoincrement
|
||||||
@ -7801,13 +7801,32 @@ int ObInnerTableSchema::all_virtual_query_response_time_schema(ObTableSchema &ta
|
|||||||
ObIntType, //column_type
|
ObIntType, //column_type
|
||||||
CS_TYPE_INVALID, //column_collation_type
|
CS_TYPE_INVALID, //column_collation_type
|
||||||
sizeof(int64_t), //column_length
|
sizeof(int64_t), //column_length
|
||||||
14, //column_precision
|
20, //column_precision
|
||||||
0, //column_scale
|
0, //column_scale
|
||||||
false, //is_nullable
|
false, //is_nullable
|
||||||
false, //is_autoincrement
|
false, //is_autoincrement
|
||||||
total_default,
|
total_default,
|
||||||
total_default); //default_value
|
total_default); //default_value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OB_SUCC(ret)) {
|
||||||
|
ObObj sql_type_default;
|
||||||
|
sql_type_default.set_varchar(ObString::make_string(""));
|
||||||
|
ADD_COLUMN_SCHEMA_T("sql_type", //column_name
|
||||||
|
++column_id, //column_id
|
||||||
|
0, //rowkey_id
|
||||||
|
0, //index_id
|
||||||
|
0, //part_key_pos
|
||||||
|
ObVarcharType, //column_type
|
||||||
|
CS_TYPE_INVALID, //column_collation_type
|
||||||
|
128, //column_length
|
||||||
|
-1, //column_precision
|
||||||
|
-1, //column_scale
|
||||||
|
false, //is_nullable
|
||||||
|
false, //is_autoincrement
|
||||||
|
sql_type_default,
|
||||||
|
sql_type_default); //default_value
|
||||||
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
table_schema.get_part_option().set_part_num(1);
|
table_schema.get_part_option().set_part_num(1);
|
||||||
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
||||||
|
|||||||
@ -12723,9 +12723,10 @@ def_table_schema(
|
|||||||
('tenant_id', 'int', 'false'),
|
('tenant_id', 'int', 'false'),
|
||||||
('svr_ip', 'varchar:MAX_IP_ADDR_LENGTH', 'false'),
|
('svr_ip', 'varchar:MAX_IP_ADDR_LENGTH', 'false'),
|
||||||
('svr_port', 'int'),
|
('svr_port', 'int'),
|
||||||
('response_time', 'bigint:14', 'false', '0'),
|
('response_time', 'bigint', 'false', '0'),
|
||||||
('count', 'bigint:14', 'false', '0'),
|
('count', 'bigint', 'false', '0'),
|
||||||
('total', 'bigint:14', 'false', '0')
|
('total', 'bigint', 'false', '0'),
|
||||||
|
('sql_type', 'varchar:128', 'false', '')
|
||||||
],
|
],
|
||||||
partition_columns=['svr_ip', 'svr_port'],
|
partition_columns=['svr_ip', 'svr_port'],
|
||||||
vtable_route_policy = 'distributed',
|
vtable_route_policy = 'distributed',
|
||||||
@ -14795,6 +14796,7 @@ def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15451'
|
|||||||
# 15454: __all_virtual_storage_io_usage
|
# 15454: __all_virtual_storage_io_usage
|
||||||
# 15455: __all_zone_storage
|
# 15455: __all_zone_storage
|
||||||
def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15456', all_def_keywords['__all_virtual_nic_info'])))
|
def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15456', all_def_keywords['__all_virtual_nic_info'])))
|
||||||
|
# 15457: __all_virtual_query_response_time
|
||||||
#
|
#
|
||||||
# 余留位置(此行之前占位)
|
# 余留位置(此行之前占位)
|
||||||
# 本区域定义的Oracle表名比较复杂,一般都采用gen_xxx_table_def()方式定义,占位建议采用基表表名占位
|
# 本区域定义的Oracle表名比较复杂,一般都采用gen_xxx_table_def()方式定义,占位建议采用基表表名占位
|
||||||
@ -34140,7 +34142,8 @@ def_table_schema(
|
|||||||
FROM oceanbase.__all_virtual_nic_info
|
FROM oceanbase.__all_virtual_nic_info
|
||||||
""".replace("\n", " ")
|
""".replace("\n", " ")
|
||||||
)
|
)
|
||||||
|
# 21587: GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM
|
||||||
|
# 21588: V$OB_QUERY_RESPONSE_TIME_HISTOGRAM
|
||||||
#
|
#
|
||||||
|
|
||||||
# 余留位置(此行之前占位)
|
# 余留位置(此行之前占位)
|
||||||
@ -61666,7 +61669,8 @@ def_table_schema(
|
|||||||
WHERE SVR_IP = host_ip() AND SVR_PORT = rpc_port()
|
WHERE SVR_IP = host_ip() AND SVR_PORT = rpc_port()
|
||||||
""".replace("\n", " ")
|
""".replace("\n", " ")
|
||||||
)
|
)
|
||||||
|
# 28232: GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM
|
||||||
|
# 23233: V$OB_QUERY_RESPONSE_TIME_HISTOGRAM
|
||||||
#
|
#
|
||||||
# 余留位置(此行之前占位)
|
# 余留位置(此行之前占位)
|
||||||
# 本区域占位建议:采用真实视图名进行占位
|
# 本区域占位建议:采用真实视图名进行占位
|
||||||
|
|||||||
@ -4075,9 +4075,9 @@ cnt
|
|||||||
1
|
1
|
||||||
desc information_schema.QUERY_RESPONSE_TIME;
|
desc information_schema.QUERY_RESPONSE_TIME;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
RESPONSE_TIME bigint(14) NO
|
RESPONSE_TIME bigint(20) NO
|
||||||
COUNT bigint(14) NO
|
COUNT bigint(20) NO
|
||||||
TOTAL bigint(14) NO
|
TOTAL bigint(20) NO
|
||||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from information_schema.QUERY_RESPONSE_TIME limit 1);
|
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from information_schema.QUERY_RESPONSE_TIME limit 1);
|
||||||
cnt
|
cnt
|
||||||
1
|
1
|
||||||
|
|||||||
@ -5637,9 +5637,9 @@ cnt
|
|||||||
1
|
1
|
||||||
desc information_schema.QUERY_RESPONSE_TIME;
|
desc information_schema.QUERY_RESPONSE_TIME;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
RESPONSE_TIME bigint(14) NO
|
RESPONSE_TIME bigint(20) NO
|
||||||
COUNT bigint(14) NO
|
COUNT bigint(20) NO
|
||||||
TOTAL bigint(14) NO
|
TOTAL bigint(20) NO
|
||||||
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from information_schema.QUERY_RESPONSE_TIME limit 1);
|
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from information_schema.QUERY_RESPONSE_TIME limit 1);
|
||||||
cnt
|
cnt
|
||||||
1
|
1
|
||||||
|
|||||||
@ -3393,9 +3393,10 @@ Field Type Null Key Default Extra
|
|||||||
tenant_id bigint(20) NO NULL
|
tenant_id bigint(20) NO NULL
|
||||||
svr_ip varchar(46) NO NULL
|
svr_ip varchar(46) NO NULL
|
||||||
svr_port bigint(20) NO NULL
|
svr_port bigint(20) NO NULL
|
||||||
response_time bigint(14) NO 0
|
response_time bigint(20) NO 0
|
||||||
count bigint(14) NO 0
|
count bigint(20) NO 0
|
||||||
total bigint(14) NO 0
|
total bigint(20) NO 0
|
||||||
|
sql_type varchar(128) NO
|
||||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_query_response_time;
|
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_query_response_time;
|
||||||
IF(count(*) >= 0, 1, 0)
|
IF(count(*) >= 0, 1, 0)
|
||||||
1
|
1
|
||||||
|
|||||||
@ -7213,9 +7213,10 @@ Field Type Null Key Default Extra
|
|||||||
tenant_id bigint(20) NO NULL
|
tenant_id bigint(20) NO NULL
|
||||||
svr_ip varchar(46) NO NULL
|
svr_ip varchar(46) NO NULL
|
||||||
svr_port bigint(20) NO NULL
|
svr_port bigint(20) NO NULL
|
||||||
response_time bigint(14) NO 0
|
response_time bigint(20) NO 0
|
||||||
count bigint(14) NO 0
|
count bigint(20) NO 0
|
||||||
total bigint(14) NO 0
|
total bigint(20) NO 0
|
||||||
|
sql_type varchar(128) NO
|
||||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_query_response_time;
|
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_query_response_time;
|
||||||
IF(count(*) >= 0, 1, 0)
|
IF(count(*) >= 0, 1, 0)
|
||||||
1
|
1
|
||||||
|
|||||||
Reference in New Issue
Block a user