The stats endpoint JOINs memory_links to memory_units just to filter by bank_id. With 8.2M+ links per bank this takes 18+ seconds, and the control plane polls every 10s — perpetually blocking the server. Add bank_id column directly to memory_links so the query can filter on ml.bank_id instead of mu.bank_id, letting Postgres push the filter down before the JOIN. - Migration: add bank_id TEXT NOT NULL, backfill from memory_units - All 4 INSERT paths (temporal, semantic, entity, causal) now write bank_id - Stats query filters on ml.bank_id instead of mu.bank_id |
||
|---|---|---|
| .. | ||
| versions | ||
| env.py | ||
| README | ||
| script.py.mako | ||
Generic single-database configuration.