Fix: update sql of DBA_OB_TABLE_SPACE_USAGE
This commit is contained in:
parent
eed772ed73
commit
959f0b1a54
@ -2151,7 +2151,7 @@ int ObInnerTableSchema::dba_ob_table_space_usage_schema(ObTableSchema &table_sch
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( select attl.table_id as TABLE_ID, ad.database_name as DATABASE_NAME, at.table_name as TABLE_NAME, sum(avtps.occupy_size) as OCCUPY_SIZE, sum(avtps.required_size) as REQUIRED_SIZE from oceanbase.__all_virtual_tablet_pointer_status avtps INNER JOIN oceanbase.DBA_OB_TABLE_LOCATIONS attl ON attl.tablet_id = avtps.tablet_id INNER JOIN oceanbase.__all_table at ON at.table_id = attl.table_id and at.table_id > 500000 INNER JOIN oceanbase.__all_database ad ON ad.database_id = at.database_id INNER JOIN oceanbase.__all_virtual_ls_meta_table avlmt ON avtps.ls_id = avlmt.ls_id AND avtps.svr_ip = avlmt.svr_ip AND avtps.svr_port = avlmt.svr_port AND avlmt.role = 1 group by table_id order by table_id )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( select attl.table_id as TABLE_ID, ad.database_name as DATABASE_NAME, at.table_name as TABLE_NAME, sum(avtps.occupy_size) as OCCUPY_SIZE, sum(avtps.required_size) as REQUIRED_SIZE from oceanbase.__all_virtual_tablet_pointer_status avtps INNER JOIN oceanbase.__all_tablet_to_ls attl ON attl.tablet_id = avtps.tablet_id INNER JOIN oceanbase.__all_table at ON at.table_id = attl.table_id and at.table_id > 500000 INNER JOIN oceanbase.__all_database ad ON ad.database_id = at.database_id INNER JOIN oceanbase.__all_virtual_ls_meta_table avlmt ON avtps.ls_id = avlmt.ls_id AND avtps.svr_ip = avlmt.svr_ip AND avtps.svr_port = avlmt.svr_port AND avlmt.role = 1 group by table_id order by table_id )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
|
@ -37918,7 +37918,7 @@ def_table_schema(
|
||||
sum(avtps.required_size) as REQUIRED_SIZE
|
||||
from
|
||||
oceanbase.__all_virtual_tablet_pointer_status avtps
|
||||
INNER JOIN oceanbase.DBA_OB_TABLE_LOCATIONS attl
|
||||
INNER JOIN oceanbase.__all_tablet_to_ls attl
|
||||
ON attl.tablet_id = avtps.tablet_id
|
||||
INNER JOIN oceanbase.__all_table at
|
||||
ON at.table_id = attl.table_id
|
||||
|
@ -7011,7 +7011,7 @@ cnt
|
||||
1
|
||||
desc oceanbase.DBA_OB_TABLE_SPACE_USAGE;
|
||||
Field Type Null Key Default Extra
|
||||
TABLE_ID bigint(20) NO
|
||||
TABLE_ID bigint(20) NO NULL
|
||||
DATABASE_NAME varchar(128) NO
|
||||
TABLE_NAME varchar(256) NO
|
||||
OCCUPY_SIZE decimal(42,0) NO
|
||||
|
@ -9980,7 +9980,7 @@ cnt
|
||||
1
|
||||
desc oceanbase.DBA_OB_TABLE_SPACE_USAGE;
|
||||
Field Type Null Key Default Extra
|
||||
TABLE_ID bigint(20) NO
|
||||
TABLE_ID bigint(20) NO NULL
|
||||
DATABASE_NAME varchar(128) NO
|
||||
TABLE_NAME varchar(256) NO
|
||||
OCCUPY_SIZE decimal(42,0) NO
|
||||
|
Loading…
x
Reference in New Issue
Block a user