Home >Database >Mysql Tutorial >验证堆表(heap table)存储方式

验证堆表(heap table)存储方式

WBOY
WBOYOriginal
2016-06-07 16:48:431182browse

堆表(heap table)的存储方式:Oracle 数据库系统中最普通,最为常用的即为堆表。堆表的数据存储方式为无序存储,也就是任意的D

堆表(heap table)的存储方式:

验证:

1、创建table

SQL> conn scott/tiger

Connected.

SQL> create table t1

2 (a int,

3 b varchar2(4000) default rpad('*',4000,'*'),

4 c varchar2(3000) default rpad('*',3000,'*')

5 )

6 /

Table created.

 

SQL> desc t1

Name Null? Type

----------------------------------------- -------- ----------------------------

A NUMBER(38)

B VARCHAR2(4000)

C VARCHAR2(3000)

2、插入数据

SQL> insert into t1(a) values (1);

1 rows created;

SQL> insert into t1(a) values (2);

1 rows created;

SQL> insert into t1(a) values (3);

1 rows created;

SQL> select a from t1;

A

----------

1

2

3

3、删除一行数据

SQL> delete from t1 where a=2;

1 row deleted.

SQL> select a from t1;

A

----------

1

3

4、再重新插入一行记录

SQL> insert into t1(a) values (4);

1 row created.

SQL> select a from t1;

A

----------

1

4

3

从以上可以看出,数据插入并不是按顺序插入,而是使用了原来被删除的那条记录的空间!

Oracle 在线重定义(将普通堆表转换成分区表)

本文永久更新链接地址:

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn