router icon indicating copy to clipboard operation
router copied to clipboard

Query Plan Caching Improvements

Open lleadbet opened this issue 1 year ago • 0 comments

Describe the solution you'd like

The current functionality addresses most needs, but there are a couple of improvements that could be made to help make it more useful.

  • Include the federation version as part of the cache key
  • Refresh TTLs on recently accessed query plans (optionally)
  • Make the TTL a sane default vs. indefinite (in combination with the above)

The first allows for multiple different versions to use the same query plan cache, as different federation versions would generate different query plans in theory.

The second would ensure that stale entries are evicted, but hot query plan paths are retained as long as they are being used in the current schema. For distributed caches, this can minimize the amount of data being used in memory without manual pruning or having to take a performance hit every time the TTL expires.

Describe alternatives you've considered

n/a

Additional context

n/a

lleadbet avatar Jan 12 '24 15:01 lleadbet