Files
tazlin d9faa90061 perf: index the suspicion tables by owner column, migration 5.1.1
- user_suspicions (713k rows) and worker_suspicions (570k rows) carried only their primary key, so every suspicion lookup was a sequential scan: User.is_suspicious/Worker.is_suspicious on request paths, and the kudos applier promotion-eligibility scan, whose per-candidate suspicion count did one full-table scan per candidate (EXPLAIN on prod: 22ms and 16.5M buffer hits per subplan loop)
- index=True on UserSuspicions.user_id and WorkerSuspicions.worker_id; sql_statements/5.1.1.txt creates ix_user_suspicions_user_id and ix_worker_suspicions_worker_id for existing databases (operator-applied, matching db.create_all() names); HORDE_VERSION bumped to 5.1.1
2026-07-28 16:34:58 -04:00

4 lines
104 B
Plaintext

SPDX-FileCopyrightText: Tazlin <tazlin.on.github@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later