The sort statement specifies information about a work file for sorting that is used when an index is created in the batch index creation mode (-i c).
sort [server-name] directory-name[,buffer-size-for-sorting] |
<identifier> ((1-8))
Specify the name of the server used to create the work file for sorting.
For a HiRDB/Single Server, do not specify the server name.
<pathname> ((1-255))
Specify the absolute pathname of the directory in which the sort work file is to be created.
<unsigned integer> ((128-2097152)) <<1024>>
Specify, in KB, the size of memory that is to be used as the buffer.
The system allocates this buffer at the single server for a HiRDB/Single Server and at the back-end server for a HiRDB/Parallel Server.
The sort process creates a temporary work file in a specified directory. You can use the following formula to determine a buffer size that minimizes the file size. This is just a guideline. If there is not enough memory, avoid using a large value.
n: Number of data items to be rebalanced. For a repetition column, the number of data items means the number of elements, not the number of rows.
k: Key length (calculated as a maximum value). For details about how to determine the key length, see the example of calculating the number of index storage pages in the HiRDB Version 8 Installation and Design Guide.
x: 10 if all key component columns have a fixed length; 12 if at least one of the key component columns has a variable length.
Do not allocate NFS to the directory specified in the sort statement. If NFS is allocated, twice as much space is required for the work file for sorting as when a local file is used. Also, problems occur related to retention of work files for sorting.