The srt* file is usually associated with the ABL client processes (_progres, prowin, _proapsv, _mproapsv). It provides temporary storage on disk to perform server-side sort operations that cannot be performed by the database on the client-side work directory. For example; a
BY phrase on a non-indexed field.
A
_mprosrv remote server process that handles client-server connected ABL clients will also create and use a srt* file under
certain conditions. It does not create this file when it is initially started. All queries (define query, open query, and dynamic queries) will create a srt file in the database work directory, or the directory configured when the database was opened (-T), in order to allow for reverse-sort-order seeking, reposition, etc.
Examples when a server-side sorting condition will occur:
- A remote client queries the database with a multi-component WHERE clause.
- When there are a large number of records queried where records from the table match more than one condition of the WHERE clause
- A specific example that exhibits this behavior, is a query with multiple equality matches on the same indexed field, using OR operators:
FOR EACH customer WHERE salesrep = "HXM"
OR salesrep = "DKP"
OR salesrep = "BBB":
DISPLAY name salesrep
END.
- Using a word-index with the CONTAINS operator will behave the same, if the search expression includes multiple words separated by the vertical line (|), exclamation point (!), or caret (^), which represent a logical OR. This also results in multiple equality matches on the same index and lead to a SRT file on the server-side.
DEFINE QUERY qcust FOR customer SCROLLING.
OPEN QUERY qcust FOR EACH customer WHERE comments CONTAINS "customer"
OR comments CONTAINS "C.O.D.".
REPEAT:
GET NEXT qcust.
IF NOT AVAILABLE customer THEN LEAVE.
DISPLAY customer EXCEPT comments WITH FRAME q-frame 13000 DOWN.
END.
A remote server (_mprosrv) can process multiple queries at the same time for each client-server connection being serviced by that remote server (-Ma). When multiple simultaneous queries are being run that trigger SRT* file activity on the server side, the SRT* file will expand to accommodate all of those queries. When queries are closed when they are no longer needed as any space used by the query in the srt file will then be reused.
The server-side SRT* will not decrease in size during it's lifecycle. It will grow to a peak size, after which space within the file will be freed and re-used as needed. This is consistent with other OpenEdge temp-files. A remote server can be stopped online and will be restarted when required.
Ensure there is free space available on the Server. It is recommended to use the "-T <directory>" both as a client and database startup parameter to assure these files are always redirected to a specific directory with the required read-write permissions. Otherwise, these are created in the directory the process was started from, which may vary. The srt file will not be visible on UNIX/LINUX as they are opened unlinked, unless the '-t' parameter is used. An example of where temp-files are created is provided in the following Article:
Error 354 or 2257 occurs at startup, with errno=13 explainedMethods to avoid creating a srt file or reduce the space needed on disk, is to use the client-side parameter
"-noautoreslist" or setting the Query attribute "
FORWARD-ONLY" to yes, for static or dynamic queries.