fix(backend): add composite index on user_sources

Add (user_id, enabled) index for the enabled() query path.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-16 01:25:10 +00:00
parent 21f78f7721
commit 5a652e9a65
4 changed files with 492 additions and 1 deletions

View File

@@ -0,0 +1 @@
CREATE INDEX "user_sources_user_id_enabled_idx" ON "user_sources" USING btree ("user_id","enabled");