View previous topic :: View next topic
|
Author |
Message |
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
You are welcome |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I tought my post was clear
hardware compression is not related to db2 |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
OH.
Sorry for my irrelevant examples, ENRICO |
|
Back to top |
|
|
|