[FEAT MERGE]adaptive cost model

This commit is contained in:
zzg19950727
2024-02-07 11:01:37 +00:00
committed by ob-robot
parent 1ee1ad37e4
commit 9a22f3ea88
85 changed files with 21899 additions and 18832 deletions

View File

@ -240,6 +240,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | DBA_OB_ARCHIVELOG_SUMMARY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_ARCHIVE_DEST | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_AUTO_INCREMENT | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_AUX_STATISTICS | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_JOBS | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_JOB_HISTORY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_POLICY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -461,6 +462,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | __ALL_VIRTUAL_INFORMATION_COLUMNS | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_acquired_snapshot | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_auto_increment | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_aux_stat | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_job | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_job_history | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_task | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -839,6 +841,7 @@ select * from information_schema.statistics where table_schema in ('oceanbase',
| def | oceanbase | __all_acquired_snapshot | 1 | oceanbase | idx_snapshot_tablet | 1 | tablet_id | A | NULL | NULL | NULL | YES | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 1 | sequence_key | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 2 | column_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_aux_stat | 0 | oceanbase | PRIMARY | 1 | tenant_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_job | 0 | oceanbase | PRIMARY | 1 | job_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_job_history | 0 | oceanbase | PRIMARY | 1 | job_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_task | 0 | oceanbase | PRIMARY | 1 | task_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
@ -1523,6 +1526,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | DBA_OB_ARCHIVELOG_SUMMARY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_ARCHIVE_DEST | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_AUTO_INCREMENT | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_AUX_STATISTICS | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_JOBS | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_JOB_HISTORY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | DBA_OB_BACKUP_DELETE_POLICY | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -1743,6 +1747,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | V$SYSTEM_EVENT | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_acquired_snapshot | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_auto_increment | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_aux_stat | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_job | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_job_history | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_balance_task | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -2148,6 +2153,7 @@ select * from information_schema.statistics where table_schema in ('oceanbase',
| def | oceanbase | __all_arbitration_service | 0 | oceanbase | PRIMARY | 1 | arbitration_service_key | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 1 | sequence_key | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 2 | column_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_aux_stat | 0 | oceanbase | PRIMARY | 1 | tenant_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_backup_delete_job | 0 | oceanbase | PRIMARY | 1 | tenant_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_backup_delete_job | 0 | oceanbase | PRIMARY | 2 | job_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_backup_delete_job_history | 0 | oceanbase | PRIMARY | 1 | tenant_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
@ -3069,6 +3075,7 @@ select * from information_schema.statistics where table_schema in ('oceanbase',
| def | oceanbase | __all_acquired_snapshot | 1 | oceanbase | idx_snapshot_tablet | 1 | tablet_id | A | NULL | NULL | NULL | YES | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 1 | sequence_key | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_auto_increment | 0 | oceanbase | PRIMARY | 2 | column_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_aux_stat | 0 | oceanbase | PRIMARY | 1 | tenant_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_job | 0 | oceanbase | PRIMARY | 1 | job_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_job_history | 0 | oceanbase | PRIMARY | 1 | job_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |
| def | oceanbase | __all_balance_task | 0 | oceanbase | PRIMARY | 1 | task_id | A | NULL | NULL | NULL | | BTREE | | | YES | NULL |

View File

@ -5558,3 +5558,13 @@ COMMENT longtext YES
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.DBA_OB_IMPORT_TABLE_TASK_HISTORY limit 1);
cnt
1
desc oceanbase.DBA_OB_AUX_STATISTICS;
Field Type Null Key Default Extra
LAST_ANALYZED timestamp(6) NO NULL
CPU_SPEED(MHZ) bigint(20) YES
DISK_SEQ_READ_SPEED(MB/S) bigint(20) YES
DISK_RND_READ_SPEED(MB/S) bigint(20) YES
NETWORK_SPEED(MB/S) bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.DBA_OB_AUX_STATISTICS limit 1);
cnt
1

View File

@ -7988,3 +7988,24 @@ LARGE_QUEUED bigint(20) NO
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.V$OB_TENANT_RUNTIME_INFO limit 1);
cnt
1
desc oceanbase.DBA_OB_AUX_STATISTICS;
Field Type Null Key Default Extra
LAST_ANALYZED timestamp(6) NO NULL
CPU_SPEED(MHZ) bigint(20) YES
DISK_SEQ_READ_SPEED(MB/S) bigint(20) YES
DISK_RND_READ_SPEED(MB/S) bigint(20) YES
NETWORK_SPEED(MB/S) bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.DBA_OB_AUX_STATISTICS limit 1);
cnt
1
desc oceanbase.CDB_OB_AUX_STATISTICS;
Field Type Null Key Default Extra
TENANT_ID bigint(20) NO NULL
LAST_ANALYZED timestamp(6) NO NULL
CPU_SPEED(MHZ) bigint(20) YES
DISK_SEQ_READ_SPEED(MB/S) bigint(20) YES
DISK_RND_READ_SPEED(MB/S) bigint(20) YES
NETWORK_SPEED(MB/S) bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ count(*) as cnt from (select * from oceanbase.CDB_OB_AUX_STATISTICS limit 1);
cnt
1

View File

@ -8644,3 +8644,16 @@ comment longtext YES
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_import_table_task_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_aux_stat;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
last_analyzed timestamp(6) NO NULL
cpu_speed bigint(20) YES 2500
disk_seq_read_speed bigint(20) YES 2000
disk_rnd_read_speed bigint(20) YES 150
network_speed bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_aux_stat;
IF(count(*) >= 0, 1, 0)
1

View File

@ -264,6 +264,7 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
478 __all_import_table_job_history 0 201001 1
479 __all_import_table_task 0 201001 1
480 __all_import_table_task_history 0 201001 1
494 __all_aux_stat 0 201001 1
10001 __tenant_virtual_all_table 2 201001 1
10002 __tenant_virtual_table_column 2 201001 1
10003 __tenant_virtual_table_index 2 201001 1
@ -667,6 +668,7 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
12425 __all_virtual_import_table_job_history 2 201001 1
12426 __all_virtual_import_table_task 2 201001 1
12427 __all_virtual_import_table_task_history 2 201001 1
12447 __all_virtual_aux_stat 2 201001 1
20001 GV$OB_PLAN_CACHE_STAT 1 201001 1
20002 GV$OB_PLAN_CACHE_PLAN_STAT 1 201001 1
20003 SCHEMATA 1 201002 1
@ -1034,6 +1036,8 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
21474 DBA_OB_IMPORT_TABLE_TASK_HISTORY 1 201001 1
21477 GV$OB_TENANT_RUNTIME_INFO 1 201001 1
21478 V$OB_TENANT_RUNTIME_INFO 1 201001 1
21497 DBA_OB_AUX_STATISTICS 1 201001 1
21498 CDB_OB_AUX_STATISTICS 1 201001 1
check sys table count and table_id range success
check count and table_id range for virtual table success
select * from information_schema.CHARACTER_SETS limit 1;