If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > row compression test : 9.5 vs 9.7

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-09, 08:03
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
row compression test : 9.5 vs 9.7

Hi, All

On both DB2 version i create one compressed table (in it's own tablespace/DMS container).

After LOADding 67M rows i check what DMS-container size is :

On 9.5.3 - 12 Gb
On 9.7.0 - 12.6 Gb

Why 5% difference (600Mb) is presented on 9.7 ?
Is it some change in compression algorithm on 9.7 ?

The test table contain only VARCHAR, INTEGER and DECIMAL columns.
No other tables are presented in databases (pure test)

Also, i LOAD the same 67M rows in regular table on 9.7 and see what container size for its' tablespace is 14.9 Gb

I check view SYSIBMADM.ADMINTABCOMPRESSINFO for compressed table and see what PAGES_SAVED_PERCENT and BYTES_SAVED_PERCENT is 77%

But the real size is of tables (compressed vs noncompressed) is 12.6 Gb vs 14.9 Gb

Where is this 77% difference ?

WBR, Dmitry
Reply With Quote
  #2 (permalink)  
Old 07-16-09, 12:35
db2topgun db2topgun is offline
Registered User
 
Join Date: Jul 2009
Posts: 10
This probably has something to do with the way you measure compression. If you are looking at container sizes, be sure to set tablespace to AUTORESIZE YES with very small INCREASESIZE, e.g. 5M. Allocate tablespace at initial size - make that small too. Create one table in this tablespace and load it.
Reply With Quote
  #3 (permalink)  
Old 07-17-09, 10:11
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
And reorganize the tablespace to reclaim any free space.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 07-20-09, 02:09
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
Quote:
Originally Posted by db2topgun
This probably has something to do with the way you measure compression. If you are looking at container sizes, be sure to set tablespace to AUTORESIZE YES with very small INCREASESIZE, e.g. 5M. Allocate tablespace at initial size - make that small too. Create one table in this tablespace and load it.
Hello, db2topgun

The test tablespaces is created with AUTORESIZE YES, INCREASESIZE 10Mb and initial size of tablespace container with 100Mb

For both cases (9.5 and 9.7) this is ONE database with ONE tablespace with ONE table

Also, i check next query :
Code:
SELECT COMPRESSION, 
AVGROWSIZE, 
PCTPAGESSAVED, 
PCTROWSCOMPRESSED,
AVGROWCOMPRESSIONRATIO,
AVGCOMPRESSEDROWSIZE
FROM SYSIBM.SYSTABLES 
WHERE NAME='ODSTAB_C'
completed successfully.

COMPRESSION  AVGROWSIZE  PCTPAGESSAVED  PCTROWSCOMPRESSED  AVGROWCOMPRESSIONRATIO  AVGCOMPRESSEDROWSIZE  
-----------  ----------  -------------  -----------------  ----------------------  --------------------  
R                   183             14                  5                       1                   158
And see what PCTPAGESSAVED (14%) and PCTROWSCOMPRESSED (5%)completely different (and see as true) of results (77%) showed by ADMINTABCOMPRESSINFO view and INSPECT ROWCOMPESTIMATE command.

Why it may be so different ?
Reply With Quote
  #5 (permalink)  
Old 07-20-09, 02:38
mitrofun mitrofun is offline
Registered User
 
Join Date: Sep 2007
Posts: 22
Quote:
Originally Posted by stolze
And reorganize the tablespace to reclaim any free space.
Hello, stolze

Why reorg is needed when i just LOAD data and no other actvities like DELETE or UPDATE is performed ?
Reply With Quote
  #6 (permalink)  
Old 07-20-09, 04:55
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
If you have no other commands, then you may not need reorg. But that depends on the exact options that you used for LOAD.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On