首先创建四个临时表t1,t2,t3,t4,和他们相对应的索引
复制内容到剪贴板
代码:
create table t1 as select * from user_objects;
create table t2 as select * from user_objects;
create table t3 as select * from user_objects;
create table t4 as select * from user_objects;
create unique index pk_t1_idx on t1(object_id);
create unique index pk_t2_idx on t2(object_id);
create unique index pk_t3_idx on t3(object_id);
create unique index pk_t4_idx on t4(object_id);
查看这个时候各个表对应的数据库统计信息(表,字段,索引)
复制内容到剪贴板
代码:
--查看表的统计信息
select table_name,num_rows,blocks,empty_blocks from user_table where table_names in ('T1','T2','T3','T4');
TABLE_NAME NUM_ROWS BLOCKS EMPTY_BLOCKS
T1
T2
T3
T4
--查看字段的统计信息
select table_name,column_name,num_distinct,low_value,high_value,density from user_tab_columns where table_name in ('T1','T2','T3','T4');
TABLE_NAME COLUMN_NAME NUM_DISTINCT LOW_VALUE HIGH_VALUE DENSITY
T1 OBJECT_NAME
T1 SUBOBJECT_NAME
T1 OBJECT_ID
T1 DATA_OBJECT_ID
T1 OBJECT_TYPE
T1 CREATED
T1 LAST_DDL_TIME
T1 TIMESTAMP
T1 STATUS
T1 TEMPORARY
T1 GENERATED
T1 SECONDARY
T2 OBJECT_NAME
T2 SUBOBJECT_NAME
T2 OBJECT_ID
T2 DATA_OBJECT_ID
T2