1 – ALLOCATION_PAGES
Syntax option:
ALLOCATION IS number-pages PAGES
The number of database pages initially allocated to the storage
area. Rdb will automatically extend this allocation to account
for internal structure pages, such as SPAM (spage management)
pages. For example, an allocation of 25 will be increased to 27
as shown in this example:
SQL> alter database filename MF_PERSONNEL
cont> add storage area DOC_EXAMPLE
cont> page format is uniform
cont> allocation 25;
SQL> attach 'filename MF_PERSONNEL';
SQL> show storage area DOC_EXAMPLE
DOC_EXAMPLE
Access is: Read write
Page Format: Uniform
Page Size: 2 blocks
Area File: USER_DISK:[DOC.DATABASES]DOC_EXAMPLE.RDA;1
Area Allocation: 27 pages
Extent: Enabled
Area Extent Minimum: 99 pages
Area Extent Maximum: 9999 pages
Area Extent Percent: 20 percent
Snapshot File: USER_DISK:[DOC.DATABASES]DOC_EXAMPLE.SNP;1
Snapshot Allocation: 100 pages
Snapshot Extent Minimum: 99 pages
Snapshot Extent Maximum: 9999 pages
Snapshot Extent Percent: 20 percent
Locking is Row Level
No Cache Associated with Storage Area
No database objects use Storage Area DOC_EXAMPLE
2 – CACHE USING row cache name
Assigns the named row cache to the specified storage area. All
rows stored in this area, whether they consist of table data,
segmented string data, or special rows such as index nodes, are
cached if those rows fit in the cache.
If the row cache does not exist, you must create the row cache
before terminating the CREATE DATABASE statement. For example:
SQL> CREATE DATABASE FILENAME test_db
cont> ROW CACHE IS ENABLED
cont> CREATE STORAGE AREA area1
cont> CACHE USING test1
cont> CREATE CACHE test1
cont> CACHE SIZE IS 100 ROWS
cont> ROW LENGTH IS 200 BYTES;
Only one row cache is allowed for each storage area.
NO ROW CACHE is the default for a storage area.
3 – CHECKSUM_CALCULATION
Syntax options:
CHECKSUM CALCULATION | SNAPSHOT CHECKSUM CALCULATION
This option allows you to enable or disable calculations of page
checksums when pages are read from or written to the storage or
snapshot area files.
The default is ENABLED.
NOTE
Oracle Corporation recommends that you leave checksum
calculations enabled; which is the default.
With current technology, it is possible that errors may occur
that the checksum calculation can detect but that may not
be detected by either the hardware, firmware, or software.
Unexpected application results and database corruption may occur
if corrupt pages exist in memory or on disk but are not detected.
Oracle Corporation recommends performing checksum calculations,
except in the following specific circumstances:
o Your application is stable and has run without errors on the
current hardware and software configuration for an extended
period of time.
o You have reached maximum CPU utilization in your current
configuration. Actual CPU utilization by the checksum
calculation depends primarily on the size of the database
pages in your database. The larger the database page, the
more noticeable the CPU usage by the checksum calculation may
become.
NOTE
Oracle Corporation recommends that you carefully evaluate
the trade-off between reducing CPU usage by the checksum
calculation and the potential for loss of database integrity
if checksum calculations are disabled.
Oracle Rdb allows you to disable and, subsequently, re-enable
checksum calculation without error. However, once checksum
calculations have been disabled, corrupt pages may not be
detected even if checksum calculations are subsequently re-
enabled.
4 – EXTENT
Syntax options:
EXTENT ENABLED | EXTENT DISABLED
Enables or disables extents. Extents are ENABLED by default.
You may encounter performance problems when creating hashed
indexes in storage areas with the mixed page format if the
storage area was created specifying the incorrect size for
the area and if extents are enabled. By disabling extents,
this problem can be diagnosed early and corrected to improve
performance.
5 – EXTENT_IS
Syntax options:
EXTENT IS extent-pages PAGES | EXTENT IS (extension-options)
Specifies the number of pages of each storage area file extent.
See also the description under the SNAPSHOT EXTENT argument.
6 – FILENAME file spec
Provides an explicit file specification for storage area files.
The CREATE STORAGE AREA clause creates two files: a storage area
file with a file extension of .rda, and a snapshot file with a
file extension of .snp. If you omit the FILENAME argument, the
file specification takes the following defaults:
o Device: the current device for the process
o Directory: the current directory for the process
o File name: the name specified for the storage area
Neither the file specification for the storage area nor the
snapshot file may contain a node specification.
The file specification is used for both the storage area and
snapshot files that comprise the storage area (unless you use the
SNAPSHOT FILENAME argument to specify a different file for the
snapshot file). Because the CREATE STORAGE AREA clause can create
two files with different file extensions, do not specify a file
extension with the file specification.
You may use a logical name for all or part of a file
specification.
One benefit of a multifile database is that its files can reside
on more than one disk. If you want storage area files to reside
on another disk, you must specify the FILENAME argument with a
full file specification.
However, you may choose to create a multifile database even
if your main purpose in creating the storage area is not to
distribute storage area files across more than one disk. For
instance, a multifile database enables you to:
o Take advantage of hashed indexes. Hashed indexes require a
storage area with mixed page format and cannot be stored in
the RDB$SYSTEM storage area.
o Set attributes such as page size to better correspond with
tables that will be stored in the storage area.
7 – INTERVAL
Syntax options:
INTERVAL IS number-data-pages
Specifies the number of data pages between SPAM pages in the
storage area file, and thus the maximum number of data pages each
SPAM page manages. The default, and also the minimum interval,
is 216 data pages. The first page of each storage area is a SPAM
page. The interval you specify determines where subsequent SPAM
pages are to be inserted if there are enough data pages in the
storage file to require more SPAM pages.
You cannot specify the INTERVAL storage area parameter unless you
also explicitly specify PAGE FORMAT IS MIXED.
Oracle Rdb calculates the maximum INTERVAL size based on the
number of blocks per page, and returns an error message if you
exceed this value. For example, when the page size is 2 blocks,
the maximum INTERVAL is 4008 pages. If you try to create a
storage area with the INTERVAL set to 4009, Oracle Rdb returns
the following error message:
%RDB-E-BAD_DPB_CONTENT, invalid database parameters in the database parameter
block (DPB)
-RDMS-F-SPIMAX, spam interval of 4009 is more than the Rdb maximum of 4008
-RDMS-F-AREA_NAME, area NEW
For more information about setting space area management
parameters, see the Oracle Rdb Guide to Database Maintenance.
8 – LOCKING level
Syntax options:
LOCKING IS ROW LEVEL | LOCKING IS PAGE LEVEL
Specifies if locking is at the page or row level for the storage
area. This clause provides an alternative to requesting locks on
records. Specifying a lock level when you create a storage area
overrides the database default lock level. The default is ROW
LEVEL.
When many records are accessed in the same area and on the same
page, the LOCKING IS PAGE LEVEL clause reduces the number of lock
operations performed to process a transaction; however, this is
at the expense of reduced concurrency because these pages' locks
are held until COMMIT/ROLLBACK. Transactions that benefit most
with page-level locking are of short duration and also access
several database records on the same page. However, to guarantee
consistency of the data in the absence of row locking these page
level locks must be held until the transaction ends with COMMIT
or ROLLBACK.
Use the LOCKING IS ROW LEVEL if transactions are long in duration
and lock many rows.
The LOCKING IS PAGE LEVEL clause causes fewer blocking ASTs
and provides better response time and utilization of system
resources. However, there is a higher contention for pages and
increased potential for deadlocks and long transactions may use
excessive locks.
Page-level locking is never applied to RDB$SYSTEM or the DEFAULT
storage-area, either implicitly or explicitly, because the
locking protocol can stall metadata users.
You cannot specify page-level locking on single-file databases.
9 – MAXIMUM_PAGES
Syntax options:
MAXIMUM OF max-pages PAGES
Specifies the maximum number of pages of each extent. The default
is 9,999 pages.
10 – MINIMUM_PAGES
Syntax options:
MINIMUM OF min-pages PAGES
Specifies the minimum number of pages of each extent. The default
is 99 pages.
11 – NO_ROW_CACHE
Specifies that a row cache is not assigned to the specified
storage area in the database. You cannot specify the NO ROW CACHE
clause if you specify the CACHE USING clause.
Alter the storage area and name a row cache with the CACHE USING
clause to assign a row cache to the storage area or to override
the database default. Only one row cache is allowed for each
storage area.
12 – PAGE_FORMAT
Syntax options:
PAGE FORMAT IS UNIFORM | PAGE FORMAT IS MIXED
Specifies the on-disk structure for the storage area.
o The default is PAGE FORMAT IS UNIFORM. A storage area with
uniform page format is a file that is divided into groups of n
pages, called clumps, where n equals the buffer size divided
by the page size. Both buffer size and page size are user
specified values. By default, the buffer size is 6 blocks,
and the page size is 1024 bytes or 2 blocks long, resulting
in clumps of three pages. The PAGE FORMAT IS UNIFORM argument
creates a storage area file that is divided into clumps. A set
of clumps forms a logical area that can contain rows from a
single table or index only.
Uniform page format storage areas generally give the best
performance if the tables in the storage area are likely to be
subject to a wide range of queries.
o The PAGE FORMAT IS MIXED argument creates a storage area with
a format that allows rows from more than one table to reside
on or near a particular page of the storage area file. This
is useful for storing related rows from different tables on
the same page of the data file. For storage areas subject to
repeated queries that retrieve those related rows, a mixed
page format can greatly reduce input/output overhead if the
mix of rows on the page is carefully controlled. However,
mixed page format storage areas degrade performance if the mix
of rows on the page is not suited for the queries made against
the storage area.
For more information on the relative advantages and disadvantages
of uniform and mixed storage areas, see the Oracle Rdb Guide to
Database Maintenance.
13 – PAGE SIZE blocks
Syntax options:
PAGE SIZE IS page-blocks BLOCKS
The size in blocks of each data page in the storage area. Page
size is allocated in 512-byte blocks. The default is 2 blocks
(1024 bytes). If your largest row is larger than approximately
950 bytes, allocate more blocks per page to prevent fragmented
rows. If you specify a page size larger than the buffer size, an
error message is returned.
14 – PERCENT_GROWTH
Syntax options:
PERCENT GROWTH IS growth
Specifies the percent growth of each extent. The default is 20
percent growth.
15 – SNAPSHOT_ALLOCATION
Syntax options:
SNAPSHOT ALLOCATION IS snp-pages PAGES
Specifies the number of pages allocated for the snapshot file.
The default is 100 pages.
16 – SNAPSHOT_EXTENT
Syntax options:
SNAPSHOT EXTENT IS extent-pages | SNAPSHOT EXTENT IS (extension-
options)
Specifies the number of pages of each snapshot or storage area
file extent. The default extent for storage area files is 100
pages.
Specify a number of pages for simple control over the extension.
For greater control, and particularly for multivolume databases,
use the MIN, MAX, and PERCENT GROWTH extension options instead.
If you use the MIN, MAX, and PERCENT GROWTH parameters, you must
enclose them in parentheses.
17 – SNAPSHOT_FILENAME
Syntax options:
SNAPSHOT FILENAME file-spec
Provides a separate file specification for the snapshot file. The
SNAPSHOT FILENAME argument can only be specified with multifile
databases.
This argument lets you specify a different file name, device,
or directory for the snapshot file created by the CREATE STORAGE
AREA clause. Do not specify a file extension other than .snp to
the file specification. Oracle Rdb assigns the extension .snp
to the file specification, even if you specify an alternate
extension.
If you omit the SNAPSHOT FILENAME argument, the snapshot file
gets the same device, directory, and file name as the storage
area file.
18 – STORAGE_AREA
Specifies the name of the storage area you want to create. The
name cannot be the same as any other storage area definition in
the database.
19 – STORAGE_AREA_RDB$SYSTEM
Specifies that you want the CREATE STORAGE AREA clause to
override the default characteristics for the main storage area,
RDB$SYSTEM, in a new database.
The RDB$SYSTEM storage area contains database system tables and
indices. If an alternate DEFAULT STORAGE AREA is not assigned
then this area may also contain unmapped user tables and indices.
20 – THRESHOLDS values
Syntax options:
THRESHOLDS ARE ( val1 [,val2 [,val3] ] )
Specifies one, two, or three threshold values for mixed format
pages. The threshold values represent a fullness percentage on a
data page and establish three possible ranges of guaranteed free
space on the data pages. When a data page reaches the percentage
defined by a given threshold value, the space area management
(SPAM) entry for the data page is updated to reflect the new
fullness percentage and its remaining free space.
The default threshold values for mixed areas, if not specified,
are (70,85,95), which indicates that the nominal record size
should be used for SPAM threshold calculations. Oracle Rdb never
stores a record on a page at the third threshold. The value you
set for the highest threshold can be used to reserve space on the
page for future record growth.
When only val1 is specified, this is equivalent to (val1, 100,
100). When val1 and val2 are specified, this is equivalent to
(val1, val2, 100). The trailing, unspecified thresholds default
to 100 percent. For example, THRESHOLDS ARE (40) would appear as
(40, 100, 100).
You cannot specify the THRESHOLDS storage area parameter unless
you also explicitly specify PAGE FORMAT IS MIXED.
For more information about setting space area management
parameters, see the Oracle Rdb Guide to Database Maintenance.