mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
The total for an archive search joined `archive LEFT JOIN file_group` to the FTS table. A LEFT JOIN fixes `archive` as the outer table, so SQLite scanned every Archive and ran the MATCH once per row: about 20 seconds of CPU on a Pi with 128k Archives, every time the 60-second totals cache expired. An inner join lets the planner start from the FTS matches (the same count in milliseconds). Every Archive has a FileGroup, so the count is unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| test | ||
| __init__.py | ||
| api.py | ||
| conftest.py | ||
| errors.py | ||
| lib.py | ||
| models.py | ||
| schema.py | ||