Differences between Type II and Type I Storage Areas:1. The Type II Storage Area architecture was introduced in OpenEdge 10. The difference between Type I Storage Areas (introduced in Progress 9.x) and Type II Storage Areas structure is the concept of
"clusters" per Storage Area which are a grouping of database blocks. There are three choices for cluster size:
- Small Clusters (8 database blocks),
- Medium Clusters (64 database blocks),
- Large Clusters(512 database blocks).
Whereas a Type I Storage Area contains individual database blocks, or in the new definition, a 1 database block Cluster size.
2. The maximum size of a
Type II Storage Area is fixed at approximately one Petabyte when:
- Large files are enabled.
- A maximum of 1024 extents per area and
- A maximum size of one terabyte per extent.
:: Type II maxarea = 1PB maximum area size
max Type II area size =
max-number-of-extents-per-area * max-extent-size
The
theoretical maximum number of records per Type II Storage Area is calculated as follows:
:: Type II max records
max Type II records per area =
max Type II area size * records-per-block / db_blocksize
For example, a
Type II Storage Area with
64 records per block defined in a database with
4 KB blocksize,
would yield
2^46 or
70,368,768 million addressable rows.
The maximum number of records per
Type II Storage Area is governed by the
maximum area size rather than the addressability of 64-bit database keys. As opposed to the 2^31 addressable rows per area which imposes the hard limit on the maxarea size for Type I Storage areas (and Type II Storage Areas prior to OpenEdge 10.1B).
:: Type I maxarea
max Type I area size =
2,147,483,648 / (records-per-block) *db_blocksize
Continuing the above example, a
Type I Storage Area with
64 records per block defined in a database with
4 KB blocksize, would yield a
128 GB Maximum Type I Storage Area size.
Additionally OpenEdge reserves space within each area for recovery purposes. The reserved space allows room for database growth during recovery. A database area can grow up to its maximum size, less the reserve recovery space. Please refer to the following Articles for further details on reserved space and the 2^31 rowid limit in further detail:
Creating a Type II Storage Area Structure:The method is no different from creating Type I Storage Areas (PROSTRCT CREATE | ADD). The difference is the definition in the structure file (.st) used. In addition to the Type I structure file, a third parameter after the "records per block" area definition, defines the number of blocks per cluster for that Storage Area:
- Type I Storage Areas are identified as being defined with 1 database blocks per cluster (or the value not specified at all).
- Type II Storage Areas are identified as being defined with either 8, 64, or 512 database blocks per cluster.
For example:Type I Storage Area definition:
d "[storage area name]":[area number],[records per block] [location] [f/v] [size (KB)]
# Type I Area 13, 64 records per block, 1 blocks per cluster
# The omission of the cluster size defaults the area to a Type I structure.
d "Data AreaI":13,64 /data f 1024000
d "Data AreaI":13,64 /data
# cluster size = 1, with the same result as above, a Type I structure:
d "Data AreaI":13,64;1 /data f 1024000
d "Data AreaI":13,64;1 /data
Type II Storage Area definition:
d "[storage area name]":[area number],[records per block];[cluster size] [location] [f/v] [size (KB)]
# Type II Area 131, 64 records per block, 8 blocks per cluster
d "Data AreaII":131,64;8 /data f 1024000
d "Data AreaII":131,64;8 /data
To add the new area to an existing databaseIf the database is online and OpenEdge version is 10.1A or later:
prostrct addonline <dbname> <.st name with new area>
If the database is offline:
prostrct add <dbname> <.st name with new area>