How to Compress the Oracle Data Table

How to Compress the Oracle Data Table thumbnail
Oracle database software saves disk space through table compression.

Oracle introduced table-based data compression with the 9i version of its database software. It works by storing duplicate records in a coded form rather than directly. For large tables having many duplicated data elements this saves time as well as hard drive space; retrieving data from a compressed table is quicker because the computer reads less information. The end user is not aware of the compression, as Oracle automatically decompresses the information after retrieving it. You can create new tables with the compression feature enabled, or you may alter an existing table to turn this feature on.

Instructions

    • 1

      Select a database table to which you want compression enabled. The best candidates are tables having many records with duplicated items. For example, you decide to select a large customer order history table called “customer_history.”

    • 2

      Start the Oracle command line utility program.

    • 3

      Type the command “ALTER TABLE customer_history MOVE COMPRESS;” and press the ENTER key. This compresses the data in the table. Oracle also compresses any new data you add to the table.

Tips & Warnings

  • The table compression option works for heap organized tables or tables not physically organized in a particular order. Index organized tables cannot be compressed.

Related Searches:

References

  • Photo Credit Thinkstock Images/Comstock/Getty Images

Comments

Related Ads

Featured