Try OpenEdge Now
skip to main content
Managing ABL Applications
ABL and R-code Deployment and Management : Managing Client Access to Databases : Connecting clients to databases : Reducing connection times
 
Reducing connection times
To perform database activities, the ABL client keeps a copy of the database schema, called the schema cache, in memory. By default, OpenEdge creates the schema cache by reading the database schema stored in the database file. The client reads the schema in two parts:
*During connection, the client reads all the _Db and _File records.
*When the database is referenced, the client reads all the _Index, _Index-field, _File-trig, and _Field-trig records.
The time required to read the schema is usually minimal. However, the time required to read the schema might be unacceptable under the following conditions:
*If the client connects to the database over a wide area network.
*When a large number of clients connect to a database simultaneously. For example, after a database shutdown or crash.
To reduce the amount of time required to connect, OpenEdge lets you store the schema cache as a binary file, called a schema cache file, on a local disk. The client can then read the schema directly from the schema cache file.
To create the schema cache file, you build the desired schema cache and save it to a binary file using the ABL statement SAVE CACHE. The schema cache file is portable across systems, so you can create the file once and distribute it across a heterogeneous network of systems. For information about building and saving the schema cache file, see OpenEdge Development: Programming Interfaces. For information about the SAVE CACHE statement, see OpenEdge Development: ABL Reference.
To connect using the local schema cache file, specify the Schema Cache File (-cache) startup parameter when you connect to a database. If the schema cache file is valid, OpenEdge reads the schema from the local file instead of from the database. The schema cache is valid if the time stamp of the schema cache file matches the time stamp in the database master block. If the time stamps do not match, or for some reason OpenEdge cannot read the file, OpenEdge issues a warning message and reads the schema from the database. For information about the Schema Cache File (-cache) startup parameter, see OpenEdge Deployment: Startup Command and Parameter Reference.