IBProvider v5.21. SQL query parser cache implementation
In this release of IBProvider v5, we have implemented caching the results of our own SQL query parser.
The SQL query parser is needed to define the type of query and its parameter list as well as to divide the script into separate expressions.
The SQL query cache (SQL Cache) supplements the server query cache (Stmt Cache) implemented way back in the earlier versions of IBProvider v3.
Both SQL Cache and Stmt Cache use separate threads to service their own state.
The SQL query cache works for both user queries and service queries of updatable rowset.
SQL Cache Configurations
The SQL query cache is enabled by default and each connection uses its own cache instance:
With the new initialization property «sql_cache__scope» you can configure the usage of SQL Cache generally within a database. To do this, enter «sql_cache__scope=db» in the connection string.
With the new additional property «sql_cache__instance_id» you can create separate caches for groups of connection to the same database.
To disable the SQL query cache, enter «sql_cache__scope=empty» in the connection string.
Additional SQL Cache Settings
- The initialization property «sql_cache__size» defines cache size.
- The initialization property «sql_cache__time» defines cache element lifetime.
- The initialization property «sql_cache__max_len» limits the length of queries to be cached.
The zero value of any of the above listed properties disables the SQL query cache.