Verify heaptable Storage

Source: Internet
Author: User
Heaptable storage: The most common and commonly used method in Oracle Database Systems is heaptable. The data storage method of the heap table is unordered, that is, any D

Heap table Storage: The most common and commonly used heap table in Oracle database systems. The data storage method of the heap table is unordered, that is, any D

Heap table Storage:

Verification:

1. Create a 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. Insert data

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. delete a row of data

SQL> delete from t1 where a = 2;

1 row deleted.

SQL> select a from t1;

A

----------

1

3

4. Insert a record again.

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

1 row created.

SQL> select a from t1;

A

----------

1

4

3

As can be seen from the above, data insertion is not in order, but the space for the original deleted record is used!

Oracle online redefinition (converting normal heap tables into partitioned tables)

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.