Table Compression in 9.2.0.1

Dear All,
I need to use table compression. Could you please suggest some ideas from your practice?
I tried to load 545 mb text file into database and compress it. the result of compression is not such significant I expected. I got 456 MB table. pctfree was set to 0.
As I know oracle compresses data on Database block level.
What happens if I sort text file? Will this increase the compression ratio? I mean duplicate rows will be located in same block.
Sincerely,
giviut

Not having access to a 9i R2 database I have not been able to try this for myself. However, you may find this OTN article helpful: http://otn.oracle.com/oramag/webcolumns/2003/techarticles/poess_tablecomp.html
Cheers, APC

Similar Messages

  • Do we have Table compression in Standard Edition

    Hi,
    We installed Oracle Version 11g(11.2.0.2) in our Local server and the size of the table is around 11GB. we thought of doing Table Compression. My Question is Are we having This feature in 11g Standard Edition?
    Thanks,
    Lakshmikanth

    Sorry short update...
    I found a old Thread here with same information about this issue.
    License for Table compression
    regards
    Peter

  • Advanced Table Compression Create Table with LOBs

    Hi,
    I need some help with the Advanced Table Compression when creating a table especially when they contain a LOB.
    Here are 3 examples:
    Exp#1
    CREATE TABLE emp (
          emp_id NUMBER, 
          first_name VARCHAR2(128), 
          last_name VARCHAR2(128)
    ) COMPRESS FOR OLTP;
    This one is ok - all elements are compressed.
    Exp#2
    CREATE TABLE photos (
          photo_id NUMBER,
          photo BLOB)
          LOB(photo) STORE AS SECUREFILE (COMPRESS LOW);
    This one I am confused - is it just the LOB(photo) that is compressed or the whole table. If it is just the LOB then what syntax do I need for the whole table?
    I also assume that the LOB is being stored in the default tablespace associated with this table - correct me if I am wrong!
    Exp#3
    CREATE TABLE images (
          image_id NUMBER,
          image BLOB)
          LOB(image) STORE AS SECUREFILE (TABLESPACE lob_tbs COMPRESS);
    This one I am confused - I think it is telling me that LOB(image) is being compresses and stored in tablespace lob_tbs and the other elements are being stored uncompressed in the default tablespace.
    Again if it is just the LOB then what syntax do I need for the whole table?
    Thanks & regards
    -A

    Welcome to the forums !
    Pl post details of OS, database and EBS versions. Pl be aware that Advanced Compression is a separately licensed product. Pl see if these links help
    http://blogs.oracle.com/stevenChan/2008/10/using_advanced_compression_with_e-business_suite.html
    http://blogs.oracle.com/stevenChan/2008/11/early_benchmarks_using_advanced_compression_with_ebs.html
    http://blogs.oracle.com/stevenChan/2010/05/new_whitepaper_advanced_compression_11gr1_benchmar.html
    HTH
    Srini

  • Oracle table compression

    Can you please explain - how oracle compression works - It would be really good if things will be explained with examples - also would be very use if you post some useful links ...
    Will there be any performace problems if the table is compressed ..

    BelMan wrote:
    Table compression was designed primarily for read-only environments and can cause processing overhead for DML operations in some cases. However, it increases performance for many read operations, especially when your system is I/O bound
    http://download.oracle.com/docs/cd/B13789_01/server.101/b10752/build_db.htm
    Not necessarily true. Envision a table where you have 7 years worth of data (say for auditing purposes) partitioned monthly with only the current month being actively DML'd, the rest are for all intents and purposes read only and compressed.
    Table compression was designed to be designed with :)

  • The detail algorithm of OLTP table compress and basic table compress?

    I'm doing a research on the detail algorithm of OLTP table compress and basic table compress, anyone who knows, please tell me. 3Q, and also the difference between them

    http://www.oracle.com/us/products/database/db-advanced-compression-option-1525064.pdf
    Edited by: Sanjaya Balasuriya on Dec 5, 2012 2:49 PM
    Edited by: Sanjaya Balasuriya on Dec 5, 2012 2:49 PM

  • Oracle 10g: Table Compress

    Guys,
    I was reading an article about table compression that I was reading for data warehousing environment.
    http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_data_compression_10gr2_0505.pdf
    I didnt understand couple of things like
    Oracle’s compression algorithm is based upon eliminating duplicate values in each block - what does eliminating duplicate values in each block mean
    ALTER TABLE ... MOVE COMPRESS works in 10g what is its equivalent in Oracle 9i.
    Also is there a concept of table compression in Oracle 9i
    Any inputs/suggestions would help
    Thanks

    what does eliminating duplicate values in each block meanThat a compression method. Have only once the same info. That doesn't drop from the table duplicate rows. Important phrase is here :
    "Duplicate values in all the rows and columns in a block are stored once at the beginning of the block, in what is called a symbol table for that block. All occurrences of such values are replaced with a short reference to the symbol table."
    Also is there a concept of table compression in Oracle 9iThere is such thing :
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_73a.htm#2128735
    Nicolas.

  • Table Compression with LOBs

    Hi,
    I need some help with the Advanced Table Compression when creating a table especially when they contain a LOB.
    Here are 3 examples:
    Exp#1
    CREATE TABLE emp (
          emp_id NUMBER, 
          first_name VARCHAR2(128), 
          last_name VARCHAR2(128)
    ) COMPRESS FOR OLTP;
    This one is ok - all elements are compressed.
    Exp#2
    CREATE TABLE photos (
          photo_id NUMBER,
          photo BLOB)
          LOB(photo) STORE AS SECUREFILE (COMPRESS LOW);
    This one I am confused - is it just the LOB(photo) that is compressed or the whole table. If it is just the LOB then what syntax do I need for the whole table?
    I also assume that the LOB is being stored in the default tablespace associated with this table - correct me if I am wrong!
    Exp#3
    CREATE TABLE images (
          image_id NUMBER,
          image BLOB)
          LOB(image) STORE AS SECUREFILE (TABLESPACE lob_tbs COMPRESS);
    This one I am confused - I think it is telling me that LOB(image) is being compresses and stored in tablespace lob_tbs and the other elements are being stored uncompressed in the default tablespace.
    Again if it is just the LOB then what syntax do I need for the whole table?
    Thanks & regards
    -A

    user12289108 wrote:
    Exp#2
    CREATE TABLE photos (
          photo_id NUMBER,
          photo BLOB)
          LOB(photo) STORE AS SECUREFILE (COMPRESS LOW);
    This one I am confused - is it just the LOB(photo) that is compressed or the whole table. If it is just the LOB then what syntax do I need for the whole table?
    I also assume that the LOB is being stored in the default tablespace associated with this table - correct me if I am wrong!
    SecureFile LOB compression is independent of table compression and vice versa - Oracle Database 11g: The Top New Features for DBAs and Developers | SecureFiles

  • Table Compression on Partitions

    Hi,
    Can any help how to implement Table compression on Partitions?
    Thanks in advance

    Here is two examples for you.
    Example 1. This table has two partitions. It has compression at the table level, one partition is compressed and one is not compressed
    SQL>create table test_compress1
    (t_id number(10),
    tname varchar2(30)) partition by range (t_id)
    (partition p0 values less than (50) compress
    ,partition p1 values less than (100) nocompress)
    compress ;
    Example 2. This table has two partitions. It has no compression at the table level, both partitions are compressed
    SQL>create table test_compress2
    (t_id number(10),
    tname varchar2(30)) partition by range (t_id)
    (partition p0 values less than (50) compress
    ,partition p1 values less than (100) compress);
    You can play with different options but you must ensure you read more about the limitations in your SQL Reference manual before using Compression for both table or partition.

  • Semantic-table compression

    Hi,
    How to compress semantic data in Oracle 11g.
    Please provide more details (example) for the table compression technique in semantic (11.2.0.3.0)

    Hi,
    Compressing the triple tables is highly recommanded for performance and storage reasons.
    However, if you are to enable versionning with Workspace Manager, it will fail during dbms_wm.disableversioning
    because the command dbms_wm.enableversioning only partially (with no exception) creates necessary oracle objects (triggers,...) on a compressed table.
    Full explanation is here [http://oracle-plsql10g.blogspot.com/2011/11/ora-20231-failed-during.html].
    (I'm not the author but I have had the same problem as described in the article).
    So, always compress triple table except if you use WM.
    Damien

  • Query on Oracle Concepts: Table Compression

    The attributes for table compression can be declared for a tablespace, table, or table partition. If declared at the tablespace level, then tables created in the tablespace are compressed by default. You can alter the compression attribute for a table, in which case the change only applies to new data going into that table. Consequently, a single table or partition may contain compressed and uncompressed blocks, which guarantees that data size will not increase because of compression. If compression could increase the size of a block, then the database does not apply it to the block.
    Can anybody please explain text marked as bold? How can data-size/block-size can increase by compression?
    Regards,
    Ankit Rathi
    http://oraclenbeyond.blogspot.in

    >
    The attributes for table compression can be declared for a tablespace, table, or table partition. If declared at the tablespace level, then tables created in the tablespace are compressed by default. You can alter the compression attribute for a table, in which case the change only applies to new data going into that table. Consequently, a single table or partition may contain compressed and uncompressed blocks, which guarantees that data size will not increase because of compression. If compression could increase the size of a block, then the database does not apply it to the block.
    Can anybody please explain text marked as bold? How can data-size/block-size can increase by compression?
    >
    First let's be clear on what is being said. The doc says this:
    >
    If compression could increase the size of a block, then the database does not apply it to the block.
    >
    That is misleading because, of course, the size of the block can't change. You should really read that as
    >
    If compression could increase the size of the data being stored in a block, then the database does not apply it to the block.
    >
    There is overhead associated with the compression because the metadata that is needed to translate any compressed data back into its original state is stored in the block along with the compressed data.
    The simplest analogy (though not a perfect one) is the effect you can get if you try to zip an already highly compressed file.
    For example, if you try to use Winzip to compress an image file (jpg, gif, etc) or a video file you can easily wind up with a zip file that is larger than the uncompressed file was to begin with. That is because the file itself hardly compresses at all but the overhead of the zip file adds to the ultimate file size.
    I suggest you edit your thread subject since this question is NOT about partitioning.

  • License for Table compression

    License is required in Oracle 11g for advanced compression.
    For oracle 10g table compression, is the license required?

    The licensing guide of Oracle 11.1 makes a distinction between:
    Oracle Advanced Compression --> extra cost option on top of EE
    Direct-Load Table Compression --> No extra cost option, but requires EE
    The admin guide says:
    To enable compression for all operations you must use the COMPRESS FOR ALL OPERATIONS clause. To enable compression for direct-path inserts only, you use the COMPRESS FOR DIRECT_LOAD OPERATIONS clause. The keyword COMPRESS by itself is the same as the clause COMPRESS FOR DIRECT_LOAD OPERATIONS, and invokes the same compression behavior as previous database releases.
    So if you stick to the old way of compressing data (direct load), it is less efficient than the new way (all operations), but it does not require the extra license.
    Geert De Paep

  • Table compress  or Partition compress or both

    Hi,
    I have an oracle table with approx 250 Mill. records and approx size is around 35 gb.
    I want to save space by compressing the table.
    I am not sure which compression is more effective either table compress or partitions within table should be compressed or both ?
    Please advise,
    JP

    Hi,
    this is a compromise between manageablility and performance.
    If you work with partitions you give yourself a change to work with smaller sets of data (which under certain circumstances unload your DB with unecessary IOs).
    For the rest it (space efficiency) it depends highly on the nature of what you're compressing (normal columns, blob/clob, 'redundancy' of the data ...) and which method you're using (mormal compression, Advanced compression...)
    I would suggest you to try the different methods over a quite big sample of your table (with partitioning / not paritionning, with Advanced compression, normal compression).
    I would also test bulk inserts/update/deltes (with heavy volumes), and also try the main queries you're using against this table an compare IOs/CPU
    I suggest you to have a look to this thread:
    Implement Advanced compression
    (With such volumes, I guess you'll benefit (in most of the situation) from the compression...
    Edited by: user11268895 on Jul 22, 2010 11:11 AM

  • Use or not to use table compression in Oracle 11g (11.2)?

    Hi All,
    I was trying to explore the difference between COMPRESS FOR ALL OPERATIONS, COMPRESS FOR DIRECT_LOAD OPERATIONS and NOCOMPRESS, for a table in Oracle 11.2.
    I know, we can go thru documentation and make a decision.
    Still I have run some very simple tests here.
    Case 1. Create table with COMPRESS FOR DIRECT_LOAD OPERATIONS and then update few records
    Case 2. Create table with COMPRESS FOR ALL OPERATIONS and then update few records
    Case 3. Create table with NOCOMPRESS and update few rows
    I know, Case 1 is a real dummy, but still I did that to see difference between Case1 and Case2.
    --  ---------- CASE 1 --------
    SQL> create table aaa
      2  nologging
      3  compress for direct_load operations
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:02.00
    SQL> select count(*) from aaa ;
      COUNT(*)
         50317
    Elapsed: 00:00:00.11
    SQL> update aaa set created=sysdate where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    *Elapsed: 00:00:05.43*
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.04
    SQL>
    --  ---------- CASE 2 --------
    SQL>
    SQL> create table bbb
      2  nologging
      3  compress for all operations
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:02.01
    SQL> select count(*) from bbb ;
      COUNT(*)
         50318
    Elapsed: 00:00:00.20
    SQL> update bbb set created=sysdate  where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    *Elapsed: 00:00:05.31*
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.04
    SQL>
    SQL>
    --  ---------- CASE 3 --------
    SQL> create table ccc
      2  nologging
      3  nocompress
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:01.84
    SQL> select count(*) from ccc ;
      COUNT(*)
         50319
    Elapsed: 00:00:00.15
    SQL> update ccc set created=sysdate  where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    *Elapsed: 00:00:00.06*Case1 and Case2 took 5.43 and 5.31 seconds respectively. Case 3 took 0.06 seconds.
    Difference is drastic.
    Am I doing wrong kind of test (lets be honest)?
    Should we not use compression for OLTP systems (or any systems with reasonable updates)?
    Apart from allowing to drop a column, what is the difference between COMPRESS FOR ALL OPERATIONS and COMPRESS FOR DIRECT_LOAD OPERATIONS ? where/how can I see that difference?
    Thoughts please.
    Thanks in advance.

    Hi,
    I have realised that I am using the syntax which is deprecated in 11.2.
    So I am doing the same test with
    COMPRESS BASIC
    COMPRESS FOR OLTP
    instead of
    COMPRESS FOR DIRECT_LOAD OPERATIONS (deprecated)
    COMPRESS FOR ALL OPERATIONS (deprecated)
    But the results are same. Even if I do COMPRESS FOR OLTP, my update is taking 5.4 seconds which is not very different from COMPRESS BASIC
    -- --------- CASE 1 ---------------
    SQL> create table aaa
      2  nologging
      3  compress basic
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:02.46
    SQL>
    SQL> select count(*) from aaa ;
      COUNT(*)
         50318
    Elapsed: 00:00:00.11
    SQL>
    SQL> update aaa set created=sysdate where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    Elapsed: 00:00:05.48
    -- ---------- CASE 2 ---------------
    SQL> create table bbb
      2  nologging
      3  compress for oltp
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:02.01
    SQL>
    SQL> select count(*) from bbb ;
      COUNT(*)
         50319
    Elapsed: 00:00:00.12
    SQL>
    SQL> update bbb set created=sysdate  where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    Elapsed: 00:00:05.25
    -- ---------- CASE 3 ---------------
    SQL> create table ccc
      2  nologging
      3  nocompress
      4  as
      5  select * from all_objects ;
    Table created.
    Elapsed: 00:00:01.81
    SQL>
    SQL> select count(*) from ccc ;
      COUNT(*)
         50320
    Elapsed: 00:00:00.10
    SQL>
    SQL> update ccc set created=sysdate  where owner='SYS' and object_type='VIEW';
    3485 rows updated.
    Elapsed: 00:00:00.04Any thoughts??

  • Question about table compression

    I administer several 10g databases, and have been asked to compress tables in several tablespaces. I am unfamiliar with using compression. I have read some Oracle documentation on the ALTER TABLE... MOVE COMPRESSION command, but still have several questions. Can anyone recommend a good white paper, or other documentation on how best to compress tables with existing data? Thank you in advance for your guidance!

    Basically, I have questions about how to select which tables will benefit from compression. I also read somewhere that, once a table has been compressed, new updates to the compressed data will not be compressed and so I will need to re-compress the tables periodically.
    I also needed to know if the ALTER TABLE statement will compress the existing data or just future inserted data. Through further research I found that by using the MOVE clause, it will compress the existing data. I will also need to rebuild the indexes once the ALTER TABLE statement is complete.
    Thank you for your help and encouragement!

  • Table compression in 10g

    Hi,
    If a table has compression enabled, then the data will be compressed only if there is bulk/direct load. Is there a way we can find, that the data is inserted using simple insert statement(insert into table...values...)?
    We just want to determine the candidate data for compression, which was not inserted in the defined way and it didn't get compressed.
    Database version: 10.2.0.4
    Regards,

    Hi Santi,
    Since you are using Oracle 10g version, so there is no feature by which we can perform compressed DML. Any DML uncompresses the block (in 10g).
    Read below link and replies by Hemant and HJR :
    10g Data Compression old/new
    Regards
    Girish Sharma

Maybe you are looking for

  • Creation of the rss xml feed url and the xml itself

    Hello all. I know this question has been answered before I think and I get most of the answer, BUT I want to put my podcasts on the itunes lib and know that I have to submit the rss xml. My issue is that I don't know where I put it physically. I publ

  • How to extract data from an encrypted hard drive

    Ok so i have a powerbookG4 with a dead logic board and i'm trying to extract all the data that i have from my hard drive. so i took out the hard rive and put it in a USB 3.5 hard drive enclosure, i can access some of the hard drive but the important

  • After the update of my apple Tv. my you tube is working.

    after my update on my apple Tv.. the youtube "There is  a problem communicating with you tube"..

  • Network Problem From a N00b

    hi, i am new in arch.. i installed succesfully and like this.. But can't connected the internet.. i am a standard dhcp user over eth0.. Which files should i edit? i set eth0="dhcp" in /etc/rc.conf when i enter "dhcpd" in terminal, get "no submask" or

  • Table for Cost center plan data by version

    Hello, I need to find out which tables in sap hold the cost centre and profit centre plan data by version. I am having trouble finding the tables if anyone can help? Thanks