When you run the Index Rebuild utility and choose the Sort option, you might encounter space limitations that can cause the utility to terminate. To overcome this limitation, simply create a file that contains specifications for the directories and the amount of space per directory that you want the SRT file to have access to during the Index Rebuild. The file that contains the specifications must be a text file, have the same name as the database with an extension of.srt (dbname.srt), and reside in the same directory as the .db file. In addition, the contents of the file must follow these conventions:
List the directory and the amount of space that you want to allocate to the index rebuild sort on separate lines.
The size that you specify in the dbname.srt directory specification is the maximum (in 1024 byte units) that the file can grow. Specifying 0 for any directory indicates that you want to allow unlimited growth.
Separate the directories from the size by at least one blank.
Terminate the line with a slash (/) followed by end of line.
For threaded index rebuilds, spread the directories across as many devices as possible. In threaded builds, each thread will use the next directory in the sort file, looping back to the beginning of the list, if necessary. If multiple sort files are open on the same disk, you could create significant I/O contention, reducing the performance gain of the threaded rebuild.
For example, if you want to rebuild the index for the sports database and you want the speed sort to have access to 300K of space available in the /user2/db1/first directory, 400K in the user3/junk directory, and unlimited space in the /user4/last directory, then the sports.srt looks like this on UNIX:
The Index Rebuild utility accesses the files in the order in which they are listed in the dbname.srt file. So, if you specify an amount of space that is not available, when the disk is filled, then Index Rebuild terminates and the next directory specification is not used. Thus, if a disk has only 200K of space and the dbname.srt specifies 300K, when the 200K is exhausted the Index Rebuild terminates. For example, if /user2/db1/first above does not get 300K of data, Index Rebuild never processes /user3/junk. In addition, if you specify a directory size of 0, any directories specified after it in the dbname.srt are not processed. For these reasons, you should verify that the space you specify in the dbname.srt file is available before running index rebuild.
The Index Rebuild utility opens the files for each of the directories before it actually starts the sort process. As a result, one of the following messages is displayed for each file:
Temporary sort file at pathname will use up to nK of disk space.
Or:
Temporary sort file at pathname will use the available disk space.
The previous message occurs even if the .srt file was not found.
When the sort completes, the following message is displayed for each file:
Temporary sort file at pathname used nK of disk space.
In some cases the message displays 0K. This simply means that the sort took place completely in memory.
If Index Rebuild does not find a dbname.srt file, then by default, it uses the directory supplied by either the -T parameter or the current working directory.