[Web Lesson Excerpt]6.2 example demonstrates the effect of data compression

Source: Internet
Author: User

1 Conceptual Understanding

When the system is out of storage space or we want to save storage space, generally think of data compression technology, the use of data compression technology in Oracle system can not only save our storage space, but also reduce our memory footprint, improve our I/O and query speed. Data compression technology is often used in OLAP systems, we know that usually OLAP system General data volume is large, the amount of data loaded at one time, and there is no DML operation, so data compression is more suitable for OLAP systems, but it is important to note that data compression technology will consume more time and information, Especially the cup resource.

The compact table implementation can be implemented from the time the table is created, or an existing table can be converted into a compressed table, which we will demonstrate from both sides.

2 Create a compressed table to verify the compression effect

Create two identical tables, one compressed and one uncompressed by line comparison:

To view table properties:

To view the effect after compression:

From the diagram above, you can see that the compressed table occupies 18 extents, uses 384 data blocks, has 3,145,728 bytes, the table with no compression occupies 24 extents, uses 1152 data blocks, and has 9,437,184 bytes. The comparison found that the compression ratio reached about 30%.

3 compressing a table that already exists

Create a plain data table:

Analyze the test table to count the number of data blocks that are occupied:

Analyze the test table to count the number of data blocks that are occupied:

To decompress a table:

Here we find an interesting phenomenon where we decompress an already compressed table and find that the data block it occupies does not increase.

[Web Lesson Excerpt]6.2 example demonstrates the effect of data compression

Related Article

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.