SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
A-7
ALLOCATE File Attribute
ALLOCATE File Attribute
ALLOCATE is a Guardian file attribute that reserves disk space for a file, or frees disk 
space previously reserved for a file that does not contain data. ALLOCATE applies to 
key-sequenced, relative, and entry-sequenced tables and indexes.
Allocating disk space in advance ensures that space is available when needed and 
avoids processing errors caused by full or fragmented disks during normal 
allocation-on-demand.
ALLOCATE num-extents
specifies the number of extents to allocate in advance. The number must be an 
integer between 1 and the current value of the MAXEXTENTS file attribute.
Depending on your file configuration, you might not be able to allocate the full 
number of MAXEXTENTS.
For ALTER TABLE or ALTER INDEX, ALLOCATE allocates new extents until the 
total of new and existing extents equals the specified number.
DEALLOCATE
frees all unused allocated extents (that is, all allocated extents beyond the extent 
that contains the end-of-file). DEALLOCATE is valid only for ALTER TABLE or 
ALTER INDEX.
Considerations—ALLOCATE
ALLOCATE and DEALLOCATE apply to all partitions of the specified file unless 
you include a PARTONLY clause on the statement that specifies the file attribute. 
Use the PARTONLY clause if you want to specify different numbers of extents for 
different partitions:
In a CREATE TABLE statement that defines the primary partition and four 
secondary partitions, ALLOCATE 40 allocates 40 extents to each of the five 
partitions.
In an ALTER TABLE statement that specifies PARTONLY, ALLOCATE 40 
allocates additional extents so that the specified partition has a total of 40 
extents.
In an ALTER TABLE statement that does not specify PARTONLY, ALLOCATE 
40 allocates additional extents to each partition whose total is less than 40 to 
make the number of extents equal to 40. ALLOCATE has no effect on partitions 
with 40 or more extents.
{ ALLOCATE num-extents }
{ DEALLOCATE }
The default is ALLOCATE 0.










