NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
M-2
Examples—MAX
MAX is evaluated after eliminating all null values from the aggregate set. If the
result set is empty, MAX returns a null value.
Indicator required for host variables
A host variable that receives the result of the MAX function must have an indicator
variable to handle a possible null value. (For more information about using indicator
variables, see the NonStop SQL/MP programming manual for your host language.)
Examples—MAX
To display the maximum value in the SALARY column, type:
>>SELECT MAX (SALARY) FROM PERSNL.EMPLOYEE;
(EXPR)
------------
175500.00
--- 1 row(s) selected.
MAXEXTENTS File Attribute
MAXEXTENTS is a file attribute that specifies the maximum number of extents that
can be allocated for an unpartitioned file or for each partition of a partitioned file.
MAXEXTENTS applies to key-sequenced, relative, and entry-sequenced tables and to
indexes.
num-extents
is an integer from 1 to 959 (but not less than the number of extents currently
allocated for the file) that specifies the maximum number of extents that can be
allocated.
The default is MAXEXTENTS 160.
Considerations—MAXEXTENTS
Altering MAXEXTENTS for partitioned tables and indexes
You can alter MAXEXTENTS for any partition of an index or a key-sequenced
table but only for the last partition of a relative or entry-sequenced table. (For tables
in ascending order, the last partition is the one with the highest range of FIRST KEY
values; for tables in descending order, the last partition is the one with the lowest
range of FIRST KEY values.)
Maximum value for MAXEXTENTS
It is generally not efficient to have partitions with hundreds of extents, so you should
keep MAXEXTENTS well below the allowed maximum value. If necessary,
increase the number of partitions.
MAXEXTENTS num-extents