DB2 V9.7 ??? ?? ??? ??? ??? ?? ??? ?? ?? ????. ?? ??? ?? ?? ??? ???? ?? ???? ? ? ? ?? ?????.
DB2 V9.7?? ?? ? ?? ??
l Index Compression
l Temp table Compression
l XML Compression (XDA)
l Replication support for compression
1. Index Compression
??? ??? ??? ??? ????? ???? 30~50% ?? ?? ? ?? ?????.
???? ?? ????? ??? ?? ???? ??? ?? ??? ??? ?? ????. ? ? ????? Create / Alter Index ??? ???? ??? ?? ??? ??? ? ????.
CREATE / ALTER INDEX <index_name> COMPRESS YES
|
?? ??? ??? ?? ?? ? ??? ?? ? ???? ??? ????? ?? ????.
Alter Index ??? ?? Compress YES / NO? ??? ??? ??? Reorg ??? ?? ???? Rebuild ? ??? ???. ??? rebuild ???? compress/uncompress ??? ?????.
?, MDC? ?? ???, XML path ???, ???? ???? ??? ?? ????.
???? ????? ???? ??? ? ?????? ???? ?? ??? ? ?? ??? ??? ? ?? ??? ?? Prefix ?? ???? ??? ?????.
?? 1. Index Compression
??? ??? ?? ?? ? ?? ??? ?? ??? SQL? ?? ?? ?? ? ? ??? ??? Table ??? ??? ?? ???, SYSCAT.INDEXES? ?? ?? ??? ??? ?? ?????.
??? ??? ??
l ADMIN_GET_INDEX_INFO(‘object_type’, ‘object_schema’, ‘object_name’)
l ADMIn_GET_INDEX_COMPRESS_INFO(‘object_type’, ‘object_schema’, ‘object_name’,
dbpartitionum, datapartitionid)
??? SYSCAT.INDEXES – DB2V9.5? ?? ?? ??? ??
???
|
??
|
COMPRESSION
|
??? ??? ??????? ??? ??
|
PCTPAGESSAVED
|
??? ??? ??? ???? ???? ???? ?? ?? ???
(Runstats ??? ?? ?? ?.)
|
AVGLEAFKEYSIZE
|
???? ?? leaf ???? ?? ?? ?? ??? ??
|
AVGNLEAFKEYSIZE
|
???? ?? n-leaf ???? ?? ?? ?? ??? ??
|
LASTUSED
|
-
|
2. Temporary Table Compression
DB2 V97 ??? ???? ??? Temporary ???? ???? ??? ?? ??? ?? ???. ?? ??? ?? ? ???? ??? ??? ??? ?? ?? ?? ?? ??? ??? ?? ???.
?? ??? ??? ?? ??? ???? ???? Storage Optimization Feature ????? ?? ??? ???. DGTT./CGTT? ?? ??? ??? ?? ????, ?? ?? ?? ?? ???? ??? ?? ???? ?? ?? ????? ???? ???.
?? ???? ?? ??? ?????? ?? ?? ??? ?? ????, ?? ??? Explain? ??? ??? ?????. db2pd? ?? ?? ??? ????? ???? ?? ? ? ????.
3. XML(XDA) & LOB Compression
XML ??? ??? ??? ??? ??? ??? ??? ??? ????. CREATE/ALTER TABLE ?? COMPRESS YES? ??? ??? ?? ??? ?????.
?? 2. XML Compression
XML? LOG ??? ?? ? ???? XML ?? LOB ???? ?? ???? ??? ??? ? ??? ???????. ?? ??? ?? XML?? LOB? ?? ??? LOB ???? ????? ?? ??? ????, CREATE TABLE ? INLINE LENGTH ???? ?? ???? ??? ?? ? ? ????. INLINE LENGTH? ?? LOB ??? ??? ??? ?? ?? ?? ??? ???? ???? ???? ??? ??? ??, ? ??? ??? ??? ?? ??? LOB ???? ????? ???? ???. INLINE?? ??? XML? LOB? ???? ?? ???? ???? ??? ?????.
4. Replication Support for compression
DB2 V9.7 ??? ??(Replication) ? ?? ???? ?? Compress ??? DATA CAPTURE CHANGES ??? ??? ??? ????. ? ??? Capture ? Log ?????? uncompress ? ???? ?? ? ? ??? ????.
db2ReadLogAPI? ?? log ?????? decompress ? log ???? ?? ? ? ????.
REORG ? RESETDICTIONARY ??? ?? compress dictionary? ?? ??? ? ??, ?? ??? compress dictionary ? ?? ? ??? ??? compress dictionary ? historical compress dictionary? ??? compress dictionary ?? ?? ???? ?? ? ? ????.
?? 3. db2ReadLogAPI
|