Avoid Connection Overhead for TimesTen Databases
Performance impact: Large
If applications are continually connecting and disconnecting from a database, the database may be loaded to and unloaded from memory continuously, resulting in excessive file system I/O and poor performance. Similarly, if you are using a very large database you may want to pre-load the database into memory before any applications attempt to use it.
To avoid the latency of loading a database into memory, you can change the RAM
policy of a TimesTen database to enable databases to always remain in memory. The
trade-off is that since the TimesTen database is never unloaded from memory, a final
disconnect checkpoint never occurs. So, applications should configure frequent
checkpoints with the ttCkptConfig built-in procedure. See ttCkptConfig
in the Oracle TimesTen In-Memory Database
Reference.
Alternatively, you can specify that the TimesTen database remain in memory for a specified interval of time and accept new connections. If no new connections occur in this interval, TimesTen unloads the database from memory and checkpoints it. You can also specify a setting to enable a system administrator to load and unload the database from memory manually.
To change the RAM policy of a TimesTen database, use the ttAdmin
utility. For more details on the RAM policy and the ttAdmin utility,
see Specifying a RAM Policy in this book and the ttAdmin section in the Oracle TimesTen In-Memory Database
Reference.