Add a TTL (time to live) setting for prepared statements and evict (and re-prepare) them on server connections when they expire.
This is to ensure that stale execution plans don't linger around for too long.
Couple settings I think would be good here:
[general]
prepared_statements_ttl = 300_000 # 5min default
prepared_statements_ttl_jitter = 1_000 # 1s, avoid thundering herd when evicting
Jitter helps avoid a thundering herd since most statements will be prepared around the same time.
Add a TTL (time to live) setting for prepared statements and evict (and re-prepare) them on server connections when they expire.
This is to ensure that stale execution plans don't linger around for too long.
Couple settings I think would be good here:
Jitter helps avoid a thundering herd since most statements will be prepared around the same time.