Tuesday, September 25, 2007

IBM data compressions

DB2 provided reduced in a table spatial once in a whiledistrict the data ability. This is through sentence assigns COMPRESSin CREATE in the TABLESPACE the YES option, then synchronizes watchesthe space to carry out LOAD or the REORG utility program realizes.Through uses the long character string which the shorter characterstring replace frequently appears, may reduce the data. By now couldestablish a dictionary, in which has contained the mapping primitivelong character string and their replace value information.

Saves is compressed before the data the data, as well as when fromexternal storage unit readout decompresses the data, this all needs touse the certain CPU resources. But, the data compression also maybring the advantage for the performance, because may (including DASDand in cushion pond space) center saves more data in less spaces, hasnot compared with the compression data, like this may reducesynchronization to read, reduces I/O and so on.

In decided whether reduces time a table spatial once in a whiledistrict under IBM 000-535 IBM 000-884 IBM 000-424 , must consider some matters:

1) line of length: Good long in a big way goes past (in particularwhen its close page width), the compression efficiency is lower. InDB2, the line cannot step the page, you are possibly unable to realizethe enough compression to enable a page to be allowed to hold themulti- lines.

2) table length: Regarding the bigger table space, the compression ismore effective. Regarding the extremely small table, the compressiondictionary size (8KB to 64KB) has the possibility to be able to arriveat the space which saves through the compression.

3) in data pattern: Regarding the specific table spatial once in awhile district, in the data will duplicate the pattern appearancefrequency which will appear to decide the compression the effect. Hasthe massive repetitions character string the data to have the hugecompression potential.

4) to compression estimate that, DB2 has provided independent utilityprogram DSN1COMP, through carries out this utility program to beallowed to judge the compression data the effect. Must understandabout moves this utility program more information, please refer to DB2Utilities Guide and the Reference IBM 000-535 IBM 000-884 IBM 000-424 handbook.

5) processes the cost: When compression and decompression data, mustconsume the certain CPU resources. With will use the DB2 softwaresimulator to compare, uses the CPU resources which IBM the synchrodata compression hardware may greatly reduce consumes (when DB2 start,it will judge hardware to reduce characteristic whether might use).

6) better dictionary: When uses the LOAD utility program establishesthe compression dictionary, the DB2 use loads the first n line (n isdecided to data compression degree) decides the dictionary thecontent. REORG uses one kind of sampling technique to establish thedictionary. It not only uses the first n line which loads, moreoveralso can to this utility program execution period is left over in theUNLOAD stage marches forward a line of sampling. Therefore, REORGfrequently may produce can represent in the entire table spatial oncein a while district the IBM 000-535 IBM 000-884 IBM 000-424 data dictionary.

If your environment may obtain the advantage from the compression,usually we suggested reduces these DB2 table space and the district,because when less spaces hold most according to which the CPUresources consumption which brings the performance superiority nearlyalways are bigger than compression and decompression data needs.