|
New temporary file management.IB needs temporary files for sorting results. When an index is available to return ordered results by simply walking records in index order, such index is used. However, it has been shown that in several real cases, sorting can be faster than walking records in index order. Sorting requires temporal hard disk space. In v4 and earlier releases, IB always used the temp directory as defined by the environment variables to put temporary files there.The temp directory is often used by system processes and user applications that needs to use hard disk space as a kind of buffer. The latter don't need usually top performance. However, for a specialized application like a database server that relies heavily on I/O performance, having a fast media to work with temporary files may be critical. IB5 now distinguishes two temporary file types: sort files and history list files. In this case, I found that the right explanation is in the IB5 manual ©Borland: «The InterBase server creates sort files when the size of the internal sort buffer isn’t big enough to perform the sort. Each request (for example, CONNECT or CREATE DATABASE) gets and shares the same list of temporary file directories. Each request creates its own temporary files (each has its own I/O file handle). Sort files are released when sort is finished or the request is released. If space runs out in a particular directory, InterBase creates a new temporary file in the next directory from the directory list. If there are no more entries exist in the directory list, it prints an error message and stops processing the current request. The InterBase clients isql and Windows ISQL create the history list files to keep track of the input commands. Each instance creates its own temporary files, which can increase in size until they run out of disk space. Temporary file management is not synchronized between clients. When a client quits, it releases its temporary files.» After such explanation, I will try to detail the variables to configure temporary file management: The hard coded, predefined location for temporary files is the /tmp directory (UNIX) or C:\temp (Windows). TMP: this is an environment variable used to define where IB stores temporary files (sort files for the server and history list files for the client). This is a common defined environment variable in several operating systems and not IB specific. It overrides the hard coded location. INTERBASE_TMP: this is an environment variable to set the location of the sort files created by the server. It overrides the TMP variable. It was implemented in v5. The client-side history list files always use TMP. TMP_DIRECTORY: this is an entry in the IB configuration file and it allows finer control over location and size of available space for server sort files. The syntax is INTERBASE_LOCK: this environment variable defines the location of the IB lock file, where IB keeps the lock requests needed to synchronize access to data. INTERBASE_MSG: this environment variable defines the location of the IB message file, that's need by the client library and client utilities to translate message codes into human readable messages. It's important to note that for those variables to be in the scope of the IB process, they must be defined as system environment variables under NT and in the system profile under UNIX. In the case of Win9X or when IB is run only as an application under NT (and not as a service), the user environment variables are enough.
|
This page was last updated on 2001-02-04 01:10:18 |