Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Compressing TABLESPACE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Sep 24, 2008 11:52 am    Post subject: Compressing TABLESPACE
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    Post subject: Reply to: Doubt: Compressing TABLESPACE
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: 1013
Location: India

PostPosted: Wed Sep 24, 2008 3:13 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Sep 24, 2008 4:02 pm    Post subject: Reply to: Compressing TABLESPACE
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: 1013
Location: India

PostPosted: Wed Sep 24, 2008 4:21 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Sep 24, 2008 4:49 pm    Post subject: Reply to: Compressing TABLESPACE
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: 1013
Location: India

PostPosted: Wed Sep 24, 2008 4:59 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Image Copy of a tablespace that conta... Robin Sulsona DB2 4 Thu Jun 02, 2016 1:47 am
No new posts IBMHPU - Tablespace and Imagecopy chaitanya bharath DB2 1 Fri Apr 15, 2016 5:54 pm
No new posts Query on Image Copy Tablespace and QU... vickey_dw DB2 3 Fri Oct 23, 2015 10:55 am
No new posts UNLOAD from Image Copy Tablespace wit... alluri12 DB2 5 Wed Sep 23, 2015 7:00 pm
No new posts BMC UNLOAD for a LOB tablespace JyothsnaNayak DB2 2 Wed Jul 29, 2015 2:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us