hey @bitter whale, a couple of things that might help narrow it down:
- can you run this on your DB and share the result?
EXPLAIN ANALYZE
SELECT id, snapshot FROM transactions
WHERE tenant_id = '<any_tenant_id>'
ORDER BY id DESC LIMIT 1;
there's a known missing index on that table that gets worse as tenants grow, curious if that's what you're hitting
-
are you sending
snap_token: ""(empty) on your check requests? that triggers an extra DB query on every single check. -
what's your average number of concurrent check requests hitting the service?