You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiled EdgeQL cache (SQLs) should survive server restarts, so that restarts won't cause potentially large drops in quality of service (like a slow query) when rebuilding the cache.
(secondary) Reduce server memory footprint and backend network load.
Proposal
Dynamically create individual SQL functions for each compiled EdgeQL (named/indexed by query / argument types hash and schema version) in order to replace the current in-memory LRUMapping. The EdgeDB server should keep an up-to-date list of cached queries (names of functions) to avoid extra round-trip to the backend checking the existence of the cache of a certain query, so that the server could either just execute that function (cache hit), or compile + create function + execute function (cache miss) with minimal I/O to the backend, when handling an EdgeQL query request.
Action items
Test how well Postgres handles concurrent changes to the functions table under load
Design for multi-backend-tenancy (multiple EdgeDB servers on one backend) - basically a notification for other tenants to reload what's cached in the backend
Design the cleanup of the "cache" (functions table) when hitting maxsize
Make sure prepared statements work fine
Benchmark to see how the design performs
Use CALL Postgres protocol message to call the cached funcs
The text was updated successfully, but these errors were encountered:
Whenever postgres skips a DROP because IF EXISTS fails, it emits an
INFO. Since this happens every time a query cache misses, I found this
annoyingly noisy.
Make those operate by using an explicit condition check instead. Doing
this required removing a check that converted such checks into IF
EXISTS as well as fixing some problems with our checks.
This is one of two checkboxes left on #6493, I think, the other being
a flake I dimly remembered, so we can probably close that?
Objective
Proposal
Dynamically create individual SQL functions for each compiled EdgeQL (named/indexed by query / argument types hash and schema version) in order to replace the current in-memory LRUMapping. The EdgeDB server should keep an up-to-date list of cached queries (names of functions) to avoid extra round-trip to the backend checking the existence of the cache of a certain query, so that the server could either just execute that function (cache hit), or compile + create function + execute function (cache miss) with minimal I/O to the backend, when handling an EdgeQL query request.
Action items
maxsize
UseCALL
Postgres protocol message to call the cached funcsThe text was updated successfully, but these errors were encountered: