Setting the parameter MaxStatementCacheSize in firebird.conf file #8569
-
Hello ! Please, tell me what changes may occur in the program's operation with the DB under Firebird 5.0 when connecting the parameter MaxStatementCacheSize with the value set to 0 ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
The statement caches stores the prepared plan for a specific statement text. So, simplified, if you prepare a statement, the server will check if it already has a plan for that statement text (and some other details), and if so, it uses that instead of preparing the whole plan anew. If the statement is not already in the cache, it will prepare it, and if possible store it in the cache. In other words, if the cache size is 0, nothing is ever cached, so each call to prepare will prepare the statement anew, instead of being able to reuse the information resulting from a previous prepare. That is basically the same behaviour as in older versions that did not have a statement cache. Why do you think it would lead to program failures? |
Beta Was this translation helpful? Give feedback.
-
I clarified to be sure. |
Beta Was this translation helpful? Give feedback.
The statement caches stores the prepared plan for a specific statement text. So, simplified, if you prepare a statement, the server will check if it already has a plan for that statement text (and some other details), and if so, it uses that instead of preparing the whole plan anew. If the statement is not already in the cache, it will prepare it, and if possible store it in the cache.
In other words, if the cache size is 0, nothing is ever cached, so each call to prepare will prepare the statement anew, instead of being able to reuse the information resulting from a previous prepare. That is basically the same behaviour as in older versions that did not have a statement cache.
Why do you…