The sort statement specifies information about a work file for sorting that is to be used when an index is created (information such as the directory in which the file is to be created and the number of buffer sectors for sorting).
sort [server-name] directory-name[,buffer-size-for-sorting] |
~<identifier> ((1-8))
Specifies the name of the server used to create the work file for sorting.
~<pathname> ((1-255))
Specifies the absolute path name of the directory in which sort work file is to be created.
~<unsigned integer> ((128-2097152)) <<1024>>
Specifies 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 for sorting 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; avoid using a large value. Note that this formula provides a value that minimizes the file size, not a value that minimizes the sorting time. If there is enough memory, specify a buffer size of about several megabytes to several tens of megabytes.
n: Number of unloaded data items. For a repetition column, this is 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 9 Installation and Design Guide.
x: 10, if all key component columns are fixed length; 12, if at least one of the key component columns is variable length.