IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compressing TABLESPACE


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Sep 24, 2008 11:52 am
Reply with quote

I have a question about compressing a segmented tablespace.

Just consider a tablespace is created with the following properties.
PCTFREE = 20
FreePage = 15
SEG size =64
Compress Type = DB2
Compress = 20


And a table is created in this tablespace and a select query is executed.
Before searching for the records it has to uncompress the tablespace, search for the records and then retreive it.


Does compressing affect the performance of retreiving the records.
I.e., Is retreving records from the UNCOMPRESSED tablespace FAST
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Sep 24, 2008 12:23 pm
Reply with quote

Quote:

Another question I am commonly asked is about overhead. Yes, there is going to be some overhead involved if you turn on compression... CPU is required to apply the Ziv-Lempel algorithm to compress upon insertion - and to de-compress upon access. Of course, this does NOT mean that overall performance will suffer if you turn on compression. Rememeber the trade-off: additional CPU in exchange for possibly improved I/O efficiency. You see, when more compressed rows fit onto a single page fewer I/O operations may be needed to satisfy your query processing needs. If you are performing a lot of sequential access (as opposed to random access) you can get improved performance because fewer I/O operations are required to access the same number of rows.

Of course. there is always the other trade-off to consider, too: disk storage savings in exchange for CPU cost of compressing and decompressing data. Keep in mind, too though, DB2 can use hardware-assisted compression if you have the right type of hardware. Hardware-assisted compression simply speeds up the compression and decompression of data -- it is not a requirement for the inherent data compression features of DB2. So, the overall cost of compression may be minimal with hardware-assisted compression. Indeed, due to I/O issues, overall elapsed time for certain I/O heavy processes may decrease when data is compressed.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Sep 24, 2008 3:13 pm
Reply with quote

Prasanth,

THANK YOU VERY MUCH. THIS NEARLY SAID EVERYTHING.

Doubts
Quote:
DB2 can use hardware-assisted compression if you have the right type of hardware. Hardware-assisted compression simply speeds up the compression and decompression of data -- it is not a requirement for the inherent data compression features of DB2.


"hardware-assisted compression " is a hardware tool that comes with db2.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Sep 24, 2008 3:17 pm
Reply with quote

You are welcome icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Sep 24, 2008 4:02 pm
Reply with quote

Quote:
"hardware-assisted compression " is a hardware tool that comes with db2.

no
hardware compression is a hardware feature full stop
its services are invoked thru the instruction "CMPSC"
Quote:
The second operand is compressed or expanded,
depending on a specification in general register 0,
and the results are placed at the first-operand
location.

for details see

z/Architecture Principles of Operation, SA22-7832-02
Enterprise Systems Architecture/390 Data Compression, SA22-7208-01.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Sep 24, 2008 4:21 pm
Reply with quote

Enrico,

Quote:
hardware compression is a hardware feature.


Is it a hardware feature that comes with DB2. i.e., If you buy a computer it will have a mouse.

Or

Is it a external hardware feature that DB2 can use. i.e., Like a graphics Card for the computer.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Sep 24, 2008 4:49 pm
Reply with quote

I tought my post was clear
hardware compression is not related to db2
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Sep 24, 2008 4:59 pm
Reply with quote

OH.
Sorry for my irrelevant examples, ENRICO
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts force tablespace using LISTDEF input DB2 1
No new posts Map VSAM Dataset to a Table/Tablespace DB2 5
No new posts DB2 tablespace space limitation DB2 3
No new posts Issue While Recovering a Tablespace DB2 4
No new posts Need inputs on DB2 tablespace/table r... DB2 3
Search our Forums:

Back to Top