demo06.sql
来自「Expert Oracle Database Architecture 9i a」· SQL 代码 · 共 56 行
SQL
56 行
create table t1
( x int primary key,
y varchar2(25),
z date
)
organization index;
create table t2
( x int primary key,
y varchar2(25),
z date
)
organization index
OVERFLOW;
create table t3
( x int primary key,
y varchar2(25),
z date
)
organization index
overflow INCLUDING y;
select dbms_metadata.get_ddl( 'TABLE', 'T1' ) from dual;
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
/
analyze index iot_pk validate structure;
select lf_blks, br_blks, used_space,
opt_cmpr_count, opt_cmpr_pctsave
from index_stats;
alter table iot move compress 1;
analyze index iot_pk validate structure;
select lf_blks, br_blks, used_space,
opt_cmpr_count, opt_cmpr_pctsave
from index_stats;
alter table iot move compress 2;
analyze index iot_pk validate structure;
select lf_blks, br_blks, used_space,
opt_cmpr_count, opt_cmpr_pctsave
from index_stats;
begin
dbms_metadata.set_transform_param
( DBMS_METADATA.SESSION_TRANSFORM, 'STORAGE', false );
end;
/
select dbms_metadata.get_ddl( 'TABLE', 'T2' ) from dual;
select dbms_metadata.get_ddl( 'TABLE', 'T3' ) from dual;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?