


A-SYB-FAST-ACCESS is a configuration variable that is set from your COBOL program. Files opened while this variable is set to a non-zero value will be optimized for forward sequential access. While the default value is "0", this configuration variable can also take values of "Yes," "No," "True," "False," "On," or "Off."
Acucorp implemented this option to substantially improve the READ NEXT performance in some cases. For example, testing the Acucorp benchmark program iobench.cbl in 3 different ways, yielded the following results for the READ AND SKIP operation:
| No FAST_ACCESS:
| 72.76 seconds
|
| FAST ACCESS, ROWCOUNT 0:
| 148.88 seconds
|
| FAST ACCESS, ROWCOUNT 10:
| 8.09 seconds |
| (10 is the perfect value for ROWCOUNT in this benchmark, since the program does a START, 10 READ NEXT operations, and does it again.) |
First, files opened with FAST ACCESS use a dedicated connection for reading from the file. Since connections are memory-intensive (both on the client, and on the server), the number of files opened with FAST ACCESS should be kept to a minimum. In the event that opening a connection fails, the file open will still continue, but FAST ACCESS mode will be disabled. (In the file trace, a message is printed: FAST_ACCESS mode not available.) Also, a new connection technically uses a new concurrent Sybase license from Sybase.
Files open with FAST ACCESS will not participate in transactions, and may even cause the runtime to hang if transactions are used, especially if the FAST ACCESS file is updated within the transaction. We suggest that if you use transactions, you don't use FAST ACCESS. At the minimum, if you use transactions, we suggest that you use FAST ACCESS only for files open INPUT.
Files open with FAST ACCESS can not be read backwards. In other words, READ PREVIOUS will not work with FAST ACCESS files. In fact, if you try to READ PREVIOUS on a file opened with FAST ACCESS, you will get an error 9D,20.
The ANSI standard states that READ NEXT after a READ will return the next record. Some applications depend on this, and some applications just want to read dynamically from a file, and don't use the positioning facility. Because of this ambiguity, files that are open with FAST ACCESS can not be READ dynamically. If you try to READ on a file open with FAST ACCESS, you will get an error 9D,20.
There are no restrictions on WRITE, REWRITE, and DELETE. However, these operations use the cursor-based connection, not the dedicated connection. This is the reason transactions may hang.