>  기사  >  데이터 베이스  >  Oracle 11gR2 创建无数据对象临时不分配segment

Oracle 11gR2 创建无数据对象临时不分配segment

WBOY
WBOY원래의
2016-06-07 17:33:281133검색

做实验发现oracle11gR2,创建无数据的table、index等对象,oracle为了节省空间,开始并不分配segment,而是等有dml操作时才会分配

做实验发现Oracle11gR2,创建无数据的table、index等对象,oracle为了节省空间,开始并不分配segment,,而是等有dml操作时才会分配segment,即使dml回滚,分配的segment并不回收。

简单实验如下:
SQL> create table test(a number);

Table created.

SQL> create index ind_test on test(a);

Index created.

QL> select segment_name,bytes from dba_segments wheresegment_name='TEST' and owner='WXLUN';

no rows selected

SQL> insert into test values(1);

1 row created.

SQL>
SQL> col SEGMENT_NAME for a22
SQL> select segment_name,bytes from dba_segments wheresegment_name in ('TEST','IND_TEST') and owner='WXLUN';

SEGMENT_NAME 
              BYTES
---------------------- ----------
IND_TEST

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.