Results 1 to 5 of 5

Thread: Segsize

  1. #1
    Join Date
    Sep 2003
    Posts
    36

    Unanswered: Segsize

    Friends,
    I have a Query This is for mainframe Db2 v 7.

    I was told that a segmented dataset can grow only till 64 GB....right?(Correct me if I m wrong...)

    In the case of Segmented tablespace we give segsize parameter(no: of pages per segment)

    If a tablespace has been defined with the segsize=32 then DB2 allocates
    32 datasets each of value 2 GB (32 * 2)...right ? So in this case if the no: of datasets exceeds 16....then its a candidate for reorg.......

    Then what happens for tablespace whose SEGSIZE = 8 .....How many datasets are getting allocated....and whats the size of each datasets........Eagerly expecting answer for my query.

    Thanks in Advance......

    Sahana

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Don’t confuse segments with OS/390 datasets. They are not the same. The segsize does not affect the number of datasets in a segmented tablespace. The largest dataset size is 2 GB. The largest tablespace size is 64 GB.

    The Segsize is the number of pages (usually 4K pages) per segment. I would suggest a value of 32 or 64 unless you have multiple small tables in the tablespace that are less than 32 or 64 pages in length. The Segsize should never be less than the prefetch size.

  3. #3
    Join Date
    Sep 2003
    Posts
    36
    Originally posted by Marcus_A
    Don’t confuse segments with OS/390 datasets. They are not the same. The segsize does not affect the number of datasets in a segmented tablespace. The largest dataset size is 2 GB. The largest tablespace size is 64 GB.

    The Segsize is the number of pages (usually 4K pages) per segment. I would suggest a value of 32 or 64 unless you have multiple small tables in the tablespace that are less than 32 or 64 pages in length. The Segsize should never be less than the prefetch size.

    Marcus,
    Thanks !.....Looks like you mean segmented tablespace can have only 32 datasets each of capacity 2 GB (ie 64 GB) irrespective of whatever be the segsize value (which is going to be multiple of 4's) ie for segsize=4,segsize=8,segsize=16 etc., Corret me if my my understanding is wrong..........

    Sahana

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The segsize has absolutely nothing to do with the number or size of datasets. NOTHING.

    Yes, a segmented or simple tablespace can have 32 datasets each of capacity 2 GB. This is automatically handled by DB2 if you use STOPGROUPS, which you definitely should be using. If you are not using STOGROUPS, you should be taken out to the woodshed. When DB2 reaches the 2GB limit, it will automatically create a new dataset. This also happens if the tablespace goes into secondary extents.

    Segsize is the number of pages (from 4 to 64 in increments of 4) in a segment. Segmented tablespaces are most useful if there are multiple tables in the tablespace. Otherwise a simple tablespace (segsize 0, or omit the keyword) is fine and sometimes preferable.

    For a 4K pages size with segsize equal to 64 the total bytes in the segment is 256K. Each segment has a space map to help DB2 identify freespace in that segment. Only pages for a single table are placed in any given segment (relevant only if you have more than 1 table in that tablespace).

    The only thing you need to know about dataset size is that if your tablespace will exceed 64GB in length, you will need a partitioned tablespace (which will take you up to 16TB).

  5. #5
    Join Date
    Sep 2003
    Posts
    36
    Thanks Marcus !....

Posting Permissions

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