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 > Deciding tablespace page size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-09, 02:14
sanjai sanjai is offline
Registered User
 
Join Date: Jan 2007
Posts: 33
Deciding tablespace page size

dear all,

i need advise from you all..

while create a table, how do we decide whether we can place the table in 4k or 8k or 32k tablespace.

is there any calculation involved to decide.

pls advise.

regards

Sanjai
Reply With Quote
  #2 (permalink)  
Old 07-23-09, 03:39
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You determine the maximum possible width of a row in the table, add some more bytes to accommodate for future addition of more columns, and then you pick the tablespace size that can contain such rows. The alternative is that you just let DB2 decide which tablespace to pick. Have a look at the documentation for the CREATE TABLE statement, where the algorithm for choosing a tablespace is explained.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 07-23-09, 12:57
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Unless you row size is the limiting factor, you would normally use smaller page sizes for OLTP, and larger page sizes for data warehouse applications.

There are two considerations:

1. Memory usage (bufferpools) - If you just need to access one row (or a few rows) for a query that will be retrieved via an index, the entire page must be placed in the bufferpool memory. The smaller the page size, the less memory that is used. This is not a factor if the entire database can fit into your bufferpools and stay resident in memory, otherwise, if you need to use memory to retreive a page, DB2 must kick some other pages out of memory to make room for the new page.

2. Speed of table scans - When you have tables that require a table scan to return the result of a query or to process an update, etc, then DB2 can usually process a table scan faster with a larger tablespace page size. Make sure the prefetch size is set appropriately.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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