LobCacheSize IBM data server driver configuration keyword
Specifies maximum cache size (in bytes) for the LOB data.
- Equivalent CLI keyword
- Equivalent IBM® data server provider for .NET connection string keyword
- IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="LobCacheSize" value="positive integer"/>
- Default setting:
- The LOB data is not cached.
- Equivalent connection or statement attribute:
- Usage notes:
- Using the LOB cache instead of the LOB locator can improve performance. When you retrieve unbound LOB data, you can avoid the use of LOB locators by setting the LobCacheSize keyword. A LOB is retrieved from the LOB cache rather than from a LOB locator if the following points are true:
- The LobCacheSize keyword is set to a value large enough to contain the entire LOB being fetched.
- An application does not bind a column before the
SQLFetch()function call followed by calls to the
SQLGetData()function to fetch the LOB data.
Dynamic Data Format is also known as progressive streaming. For servers that support progressive streaming optimize the return of LOB and XML data based on the actual length of the data. The LOB and XML data is returned in its entirety, or as an internal token called a progressive reference. Applications are responsible for managing progressive reference data retrieval.
Applications that are querying data on a server that supports progressive streaming can influence how the data is returned. Setting the LobCacheSize keyword sets a threshold that determines whether the data is returned in its entirety or as a progressive reference. If the data has a length greater than the LobCacheSize threshold value, the progressive reference is returned to the application to manage. If the data has a length less than or equal to the LobCacheSize threshold value, the data is returned in its entirety.
Applications that are querying data on a server that does not support progressive streaming can also influence how the data is returned. The LobCacheSize threshold value specifies the maximum defined size of a LOB that a application places in memory. If the defined size of a LOB exceeds the value of LobCacheSize, the LOB data is not cached. For example, a table is created with a CLOB column of 100 MB. Currently the column holds 20 MB of data and LobCacheSize set to 50 MB. In this case, the size of the CLOB itself is 20 MB, that is less than the value of LobCacheSize, 50 MB. However, the CLOB column is not cached because the defined CLOB size on the column, 100 MB, exceeds the maximum cache size that is set through LobCacheSize, 50 MB.
The ClientBuffersUnboundLOBS keyword is a related keyword.