
-- 创建iot表
prompt 
prompt 创建iot表
declare 
    num number;
begin 
    select count(1) into num from all_tables where table_name = 'IOT' and owner = 'EODA';
    if num = 1 then 
        execute immediate 'drop table eoda.iot';
    end if;
    execute immediate '
        create table iot
        (
            owner,
            object_type,
            object_name,
            constraint iot_pk primary key (owner,object_type,object_name)
        ) organization index NOCOMPRESS
        as 
        select distinct owner,object_type,object_name from all_objects
    ';
end;
/

analyze index iot_pk validate structure;
select lf_blks,br_blks,used_space,opt_cmpr_count,opt_cmpr_pctsave from index_stats;

