03.03.2022 20:19, Alex Peshkoff via Firebird-devel wrote:

I think there are two possible ways:

- Timeout of cached statement (counting from its first appearance in
cache, not last usage)

Yes, re-preparing all statements once per relatively big timeout should not cause visible performance problem.

Better it should be "re-optimizing" (just CMP_post_rse) rather than "re-preparing". The problem is that the optimizer uses the same request pool and all its allocations are "delete-by-pool", so re-optimization is gonna to become a memory leak. Perhaps we'll need to add an explicit request's child pool for optimization purposes which can be re-created during re-optimization.

- When engine detects a condition which could change a plan, it may ask
cache for invalidation.

At the first glance that's changing index active/inactive and in the future bulk insert. That's first things that come to my mind.

It's more complex than that, but I think this is a 2nd priority task and somewhat later I'll jump in to help with the optimizer part.


Dmitry


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to