Vous êtes sur la page 1sur 8

8/17/2015

Document1910687.1

saktivel(Available)

PowerViewisOff

Dashboard

Knowledge

ServiceRequests

Patches&Updates

Community

Certifications

Systems

(0)

ContactUs

Help

Collector
GiveFeedback...
ToBottom

ExadataHybridColumnarCompression(EHCC)FAQ(DocID1910687.1)
InthisDocument

Wasthisdocumenthelpful?

Yes
No

Purpose
QuestionsandAnswers

WhatarethetypesofcompressionavailablewithEHCC?

CanCTASbeusedtocreateEHCCtables?

Howtoconvertexisting/nonEHCCtabletouseEHCC?

HowtodisableEHCCcompressiononatable?

CanweuseDBMS_REDEFINITIONonlineredefinitionpackageforEHCCtables?

HowdoesupdateworksforEHCCtable?

WhatisCompressionUnit?

Howtocheckcompressionformatforaparticularrow?

HowtogetestimateofcompressionratiosforEHCCcompressiontypes?

HowtoenabletracingforEHCC?

HowtoquerystatsaboutCUs?

WhatstoragetypesaresupportedforEHCCorHCC?

Canwespecifydifferentcompressiontypeforeachpartitioninatable?

DoesEHCCsupportfunctionbasedindexes?

IsEHCCsuitableforsinglerowaccessmethods?

DoesEHCCuncompressCUstoaccessthedata?WillthisresultinmultipleI/Osforasinglerowaccess?

CanweuseEHCConnormalserverwithSUNZFSfilesystem?

WhataresupportedRDBMSversionforEHCC?

IftableisalreadyOLTPcompressionon,willIbeabletoenableEHCConthesametable?

DoesEHCCsupportsBLOBdatatype?

DoesEHCCsupportsLONGdatatype?

CanbothEHCCandOLTPcompressionwillbeonforasingletable?

InawarehousewithrowsbeingaddedtoanEHCCtableviaETL,canthenewrowsbeconvertedtoEHCC,orthewholetabletobeperiodicallyrecompressed?

MigratedatabasetoExadatawith
DBMS_FILE_TRANSFER[1902618.1]

ArethereanyapplicationcodechangesifweconverttablestoEHCC?

CanwejoinaregulartablewithEHCCtableinaquery?

InvalidMDSYSTriggersAfterUpgradeto
11.2.0.4[1955658.1]

Whichviewtocheckthecompressiontype?

What'sthedifferencebetweenquerylowandqueryhigh?

DoesOracleGoldenGatesupportsEHCCfromsourcetotargetreplication?

Ifonetableismarkedasqueryhigh,canitbemovedtoarchivehighoranyotherEHCCmethoddirectly?

WhatistheimpactonperformanceiftakingatableoutofEHCC?speciallyifthetableislarge?

InEHCCwemayhaveatabletohavemixofHCCandOLTPcompression.Doesthiscreateextraoverheadwithfetchingdatawhenrangescanisused?

IstherowmigratedoutofCUwhenupdateoccurscausingrowmigration?

Defaultsegmentsizeis8MB,canEHCCcompressionmakeitlessthan8MB?

DocumentDetails
Type:
Status:
LastMajorUpdate:
LastUpdate:

FAQ
PUBLISHED
08Aug2014
08Aug2014

RelatedProducts

NoInformationCenteravailableforthis
document.
DocumentReferences

ExadataDatabaseMachineV2
InformationCenters

NoReferencesavailableforthisdocument.
RecentlyViewed

ExadataGeneralFAQ[1072676.1]
NeedInformationaboutMigratingIAMStack
OverToExadata.[1980952.1]
MigrationsuggestionifmultipleExadata
ComputeNodeOracleHomesareusingmixed
lowerversionsthanthesharedGridOracle
Home[1353312.1]

ShowMore

References
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

1/8

8/17/2015

Document1910687.1

APPLIESTO:
ExadataDatabaseMachineV2VersionAllVersionstoAllVersions[ReleaseAllReleases]
Informationinthisdocumentappliestoanyplatform.

PURPOSE
ThisdocumentaddressesthefrequentlyaskedquestionsrelatedtoExadataHybridColumnarCompression.

QUESTIONSANDANSWERS
WhatarethetypesofcompressionavailablewithEHCC?
EHCCisavailablewithfollowingtypes:
1.WarehouseCompression
Withinwarehousecompressiontherearetwosubtypes:
a.QueryHIGH
b.QueryLOW
2.ArchiveCompression
Withinarchivecompressiontherearetwosubtypes:
a.ArchiveHIGH
b.ArchiveLOW

CanCTASbeusedtocreateEHCCtables?
Yes,CTAScanbeusedtocreateEHCCtables.
Example:
SQL>createtableexamplecompressforqueryhighasselect*fromexample2

Inthisexample"compressforqueryhigh"isspecifictoEHCCthatwillcreatetablewithcompressionenabled.

Howtoconvertexisting/nonEHCCtabletouseEHCC?
Existing/nonEHCCtablescanbeconvertedtoEHCCusingaltertablecommandsasbelow.
Example:
SQL>altertableexamplemovecompressforqueryhigh
SQL>altertableexamplecompressforqueryhigh

Infirstcaseasmoveisspecifed,existingdatawillbemovedtonewcompressionformat.
Insecondcase,newdataloadedinexistingtablewillgetEHCCcompressionkeepingexistingdataasitis.

HowtodisableEHCCcompressiononatable?
TodisableoruncompressEHCCtableusealerttablecommandasbelow:
SQL>altertableexamplenocompress
SQL>altertableexamplemovenocompress
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

2/8

8/17/2015

Document1910687.1

CanweuseDBMS_REDEFINITIONonlineredefinitionpackageforEHCCtables?
Yes.DBMS_REDEFINITIONdoessupportEHCCtablesandcanbeusedtomovedatainonlinemode.

HowdoesupdateworksforEHCCtable?
WhenarowisupdatedinEHCCtable,inthebackgroundwedoadeletefollowedbyinsertoftherow.
Whiledoingsotherearetwomajorchangeshappensatrowlevel:
1.ROWIDchangesforupdatedrowaswehavedoneadeletefollowedbyinsert.
2.UpdatedrowcomesoutoftheEHCCcompressionandisstoredintoOLTPcompressionformat.
Formoredetailsrefer:
Document1332853.1HowHybridColumnarCompressionWorksWhenRowsareInserted/Updated.

WhatisCompressionUnit?
HybridColumnarCompressionusesalogicalconstructcalledacompressionunit(CU)tostoreasetofrows.Whenyouloaddataintoatable,thedatabasestoresgroupsofrowsincolumnar
format,withthevaluesforeachcolumnstoredandcompressedtogether.Afterthedatabasehascompressedthecolumndataforasetofrows,thedatabasefitsthedataintothecompression
unit.
Referdocumentationhereformoredetailsoncompressionunitwithexample.

Howtocheckcompressionformatforaparticularrow?
Usedbms_compression.get_compression_type()togetthecompressiontypeatrowlevel.
SQL>descdbms_compression
FUNCTIONGET_COMPRESSION_TYPERETURNSNUMBER
ArgumentNameTypeIn/OutDefault?

OWNNAMEVARCHAR2IN
TABNAMEVARCHAR2IN
ROW_IDROWIDIN

Returnsthecompressiontypefortheinputrowid.Theconstantsdefinedforcompressiontype:
COMP_NOCOMPRESS=1
COMP_FOR_OLTP=2
COMP_FOR_QUERY_HIGH=4
COMP_FOR_QUERY_LOW=8
COMP_FOR_ARCHIVE_HIGH=16
COMP_FOR_ARCHIVE_LOW=32
Example:
SQL>selectDBMS_COMPRESSION.GET_COMPRESSION_TYPE('SCOTT','EXAMPLE','AAASi7AAFAAABR6AAA')FROMDUAL

Formoredetailsrefer:
Document1477918.1HowtoSeeWhetherRowsareCompressedinaTable
Document1391044.1HowToExecuteGET_COMPRESSION_TYPEForEachRow?

HowtogetestimateofcompressionratiosforEHCCcompressiontypes?
Usedbms_compression.get_compression_ratio().
descdbms_compression

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

3/8

8/17/2015

Document1910687.1

descdbms_compression
PROCEDUREGET_COMPRESSION_RATIO
ArgumentNameTypeIn/OutDefault?

SCRATCHTBSNAMEVARCHAR2IN
OWNNAMEVARCHAR2IN
TABNAMEVARCHAR2IN
PARTNAMEVARCHAR2IN
COMPTYPENUMBERIN
BLKCNT_CMPBINARY_INTEGEROUT
BLKCNT_UNCMPBINARY_INTEGEROUT
ROW_CMPBINARY_INTEGEROUT
ROW_UNCMPBINARY_INTEGEROUT
CMP_RATIONUMBEROUT
COMPTYPE_STRVARCHAR2OUT
SUBSET_NUMROWSNUMBERINDEFAULT

Formoredetailsrefer:
Document762974.1CompressionAdvisoryin11GR2:UsingDBMS_COMPRESSION
Document1589879.1HowtoUseDBMS_COMPRESSION.GET_COMPRESSION_RATIOin12c

HowtoenabletracingforEHCC?
FollowingeventscanbeusedtoenabletracingforEHCC.
event="trace[ADVCMP_COMP]disklow(TracingforEHCCloading)
event="trace[ADVCMP_DECOMP]disklow(TracingforEHCCqueries)
event="trace[ADVCMP_MAIN]disklow(Tracingforeverything)

Wherelevelcanbeoneofthefollowing:
lowest,low,medium,high,highest

HowtoquerystatsaboutCUs?
UsebelowSQLtocapturestatsaboutCUs.
SQL>selectname,valuefromv$sysstatwherenamelike'%cellCU%'
NAMEVALUE

cellCUssentuncompressed0
cellCUssentcompressed0
cellCUssentheadpiece0
cellCUsprocessedforuncompressed0
cellCUsprocessedforcompressed0

SQL>selectname,valuefromv$sysstatwherenamelike'CC%'
NAMEVALUE

CCCUsDecompressed22591
CCQueryHighCUsDecompressed11466
CCCompressedLengthDecompressed807050919
CCDecompressedLengthDecompressed8367891105
CCColumnsDecompressed68403
CCTotalColumnsforDecompression271092
CCTotalRowsforDecompression113019839
CCPiecesBufferedforDecompression22698
CCTotalPiecesforDecompression22698
CCScanCUsDecompressed70

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

4/8

8/17/2015

Document1910687.1

CCScanCUsDecompressed70
CCTurboScanCUsDecompressed11126

WhatstoragetypesaresupportedforEHCCorHCC?
ApartfromExadata,HCCissupportedonPillarAxiomandSunZFSStorageAppliance(ZFSSA).

Canwespecifydifferentcompressiontypeforeachpartitioninatable?
Yes.CompressioncanbespecifiedatthelevelofasegmentandhenceEHCCcanbespecifiedatpartitionlevel.
ForExample:
SQL>createtableorders(cid,pid,sid,price,discount,odate)
partitionbyrange(cid)
partitionp1valueslessthan(100000)nocompress,
partitionp2valueslessthan(200000)compressforarchivelow,
partitionp3valueslessthan(300000)compressforqueryhigh,
partitionp4valueslessthan(maxvalue)compressforquerylow)
asselect*fromprev_orders

DoesEHCCsupportfunctionbasedindexes?
Yes,allindextypesaresupportedincludingfunctionbasedindexes.

IsEHCCsuitableforsinglerowaccessmethods?
Yes,EHCCcompressiontypelikeQueryHIGHandQueryLOWareoptimizedforqueryonsinglerow.
SinglerowaccessmightbeexpensiveforArchiveHIGHandArchiveLOWascomparedtoQuerycompressionbutstillitcanbeused.

DoesEHCCuncompressCUstoaccessthedata?WillthisresultinmultipleI/Osforasinglerowaccess?
Yes,toaccessarowwereadtheentireCUthatcouldbecomprisedofmultipleblocks.
ThisdecompressionhappensatcellsidesoweusetheCPUandmemoryavailableatCellside.
Havingsaidthis,EHCCqueryarchitectureisoptimizedtoincreasescanqueryperformancebytakingadvantageoffewernumberofblocksreads.

CanweuseEHCConnormalserverwithSUNZFSfilesystem?
Yes,EHCCcanbeusedwithanyserverwithstorageasZFS.
Whileperformingthecompression,itchecksforcertainlibrariesandifthoselibrariesfallintosupportedstoragetypewhichisExadata,SUNZFSSAandPillar,EHCCcompressionisachieved.

WhataresupportedRDBMSversionforEHCC?
All11.2.X.Xand12cRDBMSversionsupportsEHCC.

IftableisalreadyOLTPcompressionon,willIbeabletoenableEHCConthesametable?
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

5/8

8/17/2015

Document1910687.1

Yes,ItcanbecovertedtoEHCCcompression.
Use"altertable[tablename]movecompressfor[compressiontype]"tomakeallexistingrowstomovetoEHCC".
Butatanytimeyoucanhaveonlyonecompressiontypeenabledatthetablelevel.

DoesEHCCsupportsBLOBdatatype?
EHCCdoesnotsupportBLOB.AsBLOBisunstructureddata,havetousesecurefilesinstead.

DoesEHCCsupportsLONGdatatype?
No,LONGdatatypeisnotsupportedforEHCC.

CanbothEHCCandOLTPcompressionwillbeonforasingletable?
Onlyonecompressiontypecanbeenabledattablelevel.IncaseEHCCisenabledontablelevelandtherearesinglerowupdatesonthetablethenthoseupdatedrowsgoesintoOLTP
compressedblocks.WiththiswecanhavemixofEHCCcompressedandOLTPcompressedrowsinatable.

InawarehousewithrowsbeingaddedtoanEHCCtableviaETL,canthenewrowsbeconvertedtoEHCC,orthewholetabletobeperiodicallyrecompressed?
IfETLisloadingwithdirectload,thenewrowswillbeaddedtoEHCCcompressionelseitwillgotoOLTPcompression.
IncasenewrowsgoestoOLTPcompression,youwillhavetodo"altertablemove"tomovethedatatoEHCCcompressionperiodically.

ArethereanyapplicationcodechangesifweconverttablestoEHCC?
No.therearenoapplicationlevelcodechangesrequiredtoreadorupdatedatainEHCCtables.

CanwejoinaregulartablewithEHCCtableinaquery?
Yes,wecanjoinbetweenEHCCandnonEHCCtable.

Whichviewtocheckthecompressiontype?
Usedba_tablestocheckthecompressiontype.
Example:
SQL>Selectowner,table_name,compress_forfromsys.dba_tableswherecompression='ENABLED'orderby1,2
OWNERTABLE_NAMECOMPRESS_FOR

INT_AGIIEI_POSITIONSBASIC
INT_AGIIEX_INT_AGIIE_STATUSBASIC
SCOTTAKQUERYHIGH
SCOTTEHCCQUERYHIGH
SCOTTEHCC_WQUERYLOW
SCOTTEXAMPLEARCHIVELOW
SCOTTHCCTESTQUERYLOW
SCOTTOAVALQUERYHIGH
SCOTTTAB1QUERYLOW
SYSAJAYQUERYLOW
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

6/8

8/17/2015

SYSAJAYQUERYLOW
SYSEHCC1QUERYHIGH

Document1910687.1

Forpartitiontables,useDBA_TAB_PARTITOONSaswell,sincecompressioncanbedifferentatthepartitionlevel.

What'sthedifferencebetweenquerylowandqueryhigh?
QueryHighgivesaround10XcompressionratiowhereasQueryLoggivesaround6Xcompressionratio.
QueryperformanceisbetterincaseofQueryHighascomparedtoqueryLow.
LoadtimeisbetterincaseofQueryLowascomparedtoQueryHigh.

DoesOracleGoldenGatesupportsEHCCfromsourcetotargetreplication?
OracleGoldenGatefullysupportsbasic,advanced,andEHCCcompressedtablesinintegratedcapturemodeonly.Inclassiccapturemode,OracleGoldenGatecandeliverto,
butnotcapturefrom,regularandEHCCcompressedtablesonOracleExadata.
FormoreinformationRefer:http://docs.oracle.com/cd/E28323_01/doc.1121/e27278.pdf

Ifonetableismarkedasqueryhigh,canitbemovedtoarchivehighoranyotherEHCCmethoddirectly?
Yes,thiscanbedoneusing"altertable"command.Ifmoveisspecifiedwithaltertablecommand,existingdatawillbemovedtonewcompressionformatwhereasifmoveisnospecified,new
compressionwillbeeffectivefromsubsequentloads.

WhatistheimpactonperformanceiftakingatableoutofEHCC?speciallyifthetableislarge?
TotakeatableoutofEHCCyouneedtouse"altertable..movenocompress".Whenyoudothis,thetableis
lockedandofflineforDML.Todothisonline,onecanuseonlineredefinitionpackage(DBMS_REDEFINITION).Apartfromthisthereisnootherperformanceimpact.
Ifordertoimproveperformanceofthisactivityoneshouldrunaltertablecommandinparallel.

InEHCCwemayhaveatabletohavemixofHCCandOLTPcompression.Doesthiscreateextraoverheadwithfetchingdatawhenrangescanisused?
Yes,itcancauseextraoverheadifdataisspreadacrossmultiplecompressionblocks.
Toavoidthis,oneshouldmovethetabletoEHCCcompressiontyperegularlytomovetheOLTPcompressedrowstoEHCC.

IstherowmigratedoutofCUwhenupdateoccurscausingrowmigration?
Yes,rowgoesoutofCUandisstoredinOLTPcompressedblock.

Defaultsegmentsizeis8MB,canEHCCcompressionmakeitlessthan8MB?
No,itdoesnotmakethesegmentsizesmaller,ratheritaccommodatesmoredatawithin8MBsegmentsize.
Didn'tfindwhatyouarelookingfor?

AskinCommunity...

Related
Products
SunMicrosystems>SpecializedSystems>DatabaseSystems>ExadataDatabaseMachineV2>DATABASE>CONFIGURATION

Keywords
AXIOM BLOB COMPRESSION DBMS_REDEFINITION HYBRID

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

7/8

8/17/2015

Document1910687.1

AXIOM BLOB COMPRESSION DBMS_REDEFINITION HYBRID


BacktoTop

Copyright(c)2015,Oracle.Allrightsreserved.

LegalNoticesandTermsofUse

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=202221498138119&id=1910687.1&displayIndex=7&_afrWindowMode=0&_adf.ctrlstate=19ifhdpqbl_121#PURPOSE

PrivacyStatement

8/8

Vous aimerez peut-être aussi