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 :)
Similar Messages
-
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
Thankswhat 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. -
HOW to enable oracle advance compression for EXIST partitioned table
Hi All,
I have to enable oracle advance compression for existing table which PARTITION BY RANGE then SUBPARTITION BY HASH.
ORacle version: 11.2.0.2.0
Please provide me any relevant doc or any exp.
Thanks in advance.could not see any text for how to enable oracle advance compression for EXIST partitioned table.RTFM.
From the resource above:
How do I compress an existing table?
There are multiple options available to compress existing tables. For offline compression, one could use ALTER TABLE Table_Name MOVE COMPRESS statement. A compressed copy of an existing table can be created by using CREATE TABLE Table_Name COMPRESS FOR ALL OPERATIONS AS SELECT *. For online compression, Oracle’s online redefinition utility can be used. More details for online redefinition are available here.
" -
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. -
Oracle Advance Compression Deletion Performance issue in 11g R1
Hi,
We have implemented OAC in our datawarehouse environment to enable table and index compression. We tested in our Test machine and we gained almost 600GB due to advance compression without any issues and all the informatica loads are running fine. And hence we implemented the same in our production but unfortunately two sessions which are involving deletion of data are taking more time (3 times of actual timing) for completion which affects our production environment.
The tables creating issue are all non partitioned tables.
I need to know whether Oracle Advance Compression will decrease delete performance? and is there any way to disable advance compression on those particular tables?
Our environment details:
DB earlier version: 11.1.0.6
DB current version : Oracle 11.1.0.7
Applied PSU: 11.1.0.7.6
Operating system: Solaris 5.9
Syntax used for compression:
ALTER TABLE TABLE_NAME MOVE COMPRESS FOR ALL OPERATIONS;
Thanks in Advance.Hi,
Thanks for your reply.
The note is for update performance issue and also I have applied necessary patches for improving update performance.
The update sessions are all working fine. only the deletion sessions are creating problem.
Could someone help me out to clear this problem.
Thanks,
VBK -
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,
LakshmikanthSorry short update...
I found a old Thread here with same information about this issue.
License for Table compression
regards
Peter -
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,
giviutNot 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 -
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
-AWelcome 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 -
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 -
Table compression and alter table statement
Friends
I am trying to add columns to a table which is compressed. Since Oracle treats compressed tables as Object tables, I cannot add columns directly so I tried to uncompress table first and then add columns. This doesnt seems to work.
What could be issue.
Thanks
Vishal V.
Script to test is here and results are below.
-- Test1 => add columns to uncompressed table -> Success
DROP TABLE TAB_COMP;
CREATE TABLE TAB_COMP(ID NUMBER) NOCOMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
-- Test2 =. try adding columns to compressed tables, uncompress it and then try again -> Fails
DROP TABLE TAB_COMP;
CREATE TABLE TAB_COMP(ID NUMBER) COMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP move NOCOMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
SQL> -- Test1 => add columns to uncompressed table -> Success
SQL> DROP TABLE TAB_COMP;
Table dropped.
SQL> CREATE TABLE TAB_COMP(ID NUMBER) NOCOMPRESS;
Table created.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
Table altered.
SQL>
SQL> -- Test2 =. try adding columns to compressed tables, uncompress it and then try again -> Fails
SQL> DROP TABLE TAB_COMP;
Table dropped.
SQL> CREATE TABLE TAB_COMP(ID NUMBER) COMPRESS;
Table created.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10))
ERROR at line 1:
ORA-22856: cannot add columns to object tables
SQL> ALTER TABLE TAB_COMP move NOCOMPRESS;
Table altered.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10))
ERROR at line 1:
ORA-22856: cannot add columns to object tablesWhich version of oracle you are using?
1* create table test1234(a number) compress
SQL> /
Table created.
Elapsed: 00:00:00.02
SQL> alter table test1234 add(b varchar2(200));
Table altered.
Elapsed: 00:00:00.02 -
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
-Auser12289108 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 -
Hi All,
I am new to Oracle. I need to implement Oracle Advance compression in my dataware house database.
My DB version is 11.1.0.7.0 I applied the latest patchset updates to include the patches that are needed for Oracle Advance compression.
My doubt is , Is it necessary to shut down the database before enabling the table compression and index rebuilding?
please clarify me.
Thanks
VBKNo you will not need to bounce the database.
However to get the compression on existing data you will need to reload the table and/or table partition. -
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 -
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,
JPHi,
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
Maybe you are looking for
-
How can you get Tomcat to autostart on reboot (and stay up when logged out)?
I am running Tomcat 4.1.27 app server on W2000. I have placed the startup file ("startup.bat") in the registry to execute upon reboot. It executes fine, but it doesn't stay up (window closes asap). I was hoping to find a minimize flag option or anoth
-
Photoshop 2.0 versus Photophop 10
Year ago I purchased Adobe Photoshop and Album 2 for Windows XP computer. Loved working with it, howver, I can no longer update program and after editing photos, cannot save them due to "program error". So this year, I purchased Windows 8 computer
-
Selling old iPhone 3g - erased, removed sim questions for new buyer
I have an old 3g that we have service turned off on, i did the erase all content thing and removed the sim, phone restared and said I needed to hook it up to itunes and it needed the sim againput the sim back in, got the phone back to what looks like
-
I have many of my songs duplicated in my library. How can i eliminate all the duplicate songs
I have most of my music library showing duplicate entries. How can I get this cleaned up automatically. I have over 4000 songs, and many are repeats
-
I purchased a book but I can't find it?
Alright, so I needed to buy a book because we are reading it in school. It's called Holes. So I did, so we purchased it and everything. I got an email saying :The following information for your Apple ID -emailadress- was updated on 10/15/2012. Name S