Persist Clause
- Last Updated: May 15, 2020
- 2 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Specifies the life span of the data in the cached table or view; it is optional.
Syntax
[PERSIST {TEMPORARY | MEMORY | DISK | DEFAULT}]
where:
- TEMPORARY
- specifies that the data exists for the life of the driver session. When the driver session ends, the data is discarded. A driver session begins on the first connection for a user and the session is active if at least one connection is open for the user.
- MEMORY
- specifies that the data exists beyond the life of the connection. While the connection is active, the cached data is stored in memory. When the connection is closed, the cached data is persisted to disk. If the connection ends abnormally, changes to the cached data may not be persisted to disk. This is the default.
- DISK
- specifies that the data exists beyond the life of the connection. A portion of the cached data is stored in memory while the connection is active. If the size of the cached data exceeds the cache memory threshold, the remaining data is stored on disk. When the connection is closed, the portion of the cached data that is in memory is persisted to disk. If the connection ends abnormally, changes to the cached data held in memory may not be persisted to disk.
- DEFAULT
- resets the
PERSISTvalue back to its default, which isMEMORY.
Notes
- If you specify a value of
MEMORYorDISKfor the Persist clause, the remote data remains on the client past the lifetime of the application. - You can design your application to force all cached data held in memory to be persisted to disk at any time by using the Checkpoint statement.