Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Location
    Bangalore
    Posts
    8

    Unhappy Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •