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 > Segsize

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-03, 09:20
sahana sahana is offline
Registered User
 
Join Date: Sep 2003
Posts: 36
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
Reply With Quote
  #2 (permalink)  
Old 10-14-03, 13:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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.
Reply With Quote
  #3 (permalink)  
Old 10-15-03, 01:55
sahana sahana is offline
Registered User
 
Join Date: Sep 2003
Posts: 36
Quote:
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
Reply With Quote
  #4 (permalink)  
Old 10-15-03, 02:19
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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).
Reply With Quote
  #5 (permalink)  
Old 10-15-03, 08:35
sahana sahana is offline
Registered User
 
Join Date: Sep 2003
Posts: 36
Thanks Marcus !....
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