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 > CREATE TABLESPACE help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-05-04, 06:17
brainstorms brainstorms is offline
Registered User
 
Join Date: Jun 2004
Location: Bangalore
Posts: 8
Unhappy CREATE TABLESPACE help

Can some body help me in calculating the PRIQTY

I have row size of 164 and Cardinality of 16500
Please give a generic formula so that I can use it further
Reply With Quote
  #2 (permalink)  
Old 06-05-04, 08:31
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Please read the “Must Read Before Posting” thread above and include information about your DB2 version and operating system in all questions.

There are approximately 4000 usable bytes per 4K page (you can get a more precise number from the Administration Guide, but 4000 should be close enough for most people). Therefore you can fit 24 rows per 4K page (absolute value of 4000 / 164 bytes per row). Since you have 16,500 rows in the table, you need 688 4K pages (absolute value of 16,500 / 24). 688 4K pages is 2,818,048 bytes, which is 2752 K (2,818,048 / 1024) for the primary allocation.

Obviously this does not leave room for free pages (if any) and percent free if defined for the tablespace. If you have 10 percent free, you will need to add 10% to the above number. Also you should allow for some margin of error and growth in the primary allocation, depending on your application.

Inserts may place new rows in the empty space created by the percent free, but the percent free is re-created after a reorg, so a table can actually get larger right after a tablespace reorg.
__________________
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
  #3 (permalink)  
Old 06-05-04, 09:59
brainstorms brainstorms is offline
Registered User
 
Join Date: Jun 2004
Location: Bangalore
Posts: 8
Thanks... that should help me enough. I'll read the post you mentioned. I was in too hurry.
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