wrolpi/modules
lrnselfreliance 570c63ffc7
Channel statistics: read from covering indexes, not video or file_group rows (#1059)
* Channel statistics: find a Channel's Videos in an index, not their rows

Each video row carries its ffprobe_json, so the statistics query read a
page per Video to get file_group_id.  A Channel with thousands of Videos
took seconds from a cold disk cache.  An index of (channel_id,
file_group_id) replaces video_channel_id_idx, and the tagged-Videos
subquery reads that index instead of looking up each tagged FileGroup's
video row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: read FileGroup sizes from a covering index

After the video index, the remaining cold cost was reading each Video's
file_group row for its size and length: a scattered page per Video.  An
index of file_group (id, size, length) holds them densely.  SQLite
prefers the rowid for an id lookup, so the query names the index with
INDEXED BY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: widen the FileGroup index to cover published dates

A Video's neighbors are found by the published dates of its Channel's
Videos, which reads the same scattered file_group rows.  One index of
file_group (id, published_datetime, size, length) serves both, so an
upgrade builds one index rather than two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:22:21 -07:00
..
archive Search results sort as the filter dialog says (#959) 2026-11-11 19:42:23 -07:00
docs Docs sort by their title, ignoring case (#961) 2026-11-12 13:34:59 -07:00
flasher Configs without database rows read and validate only; imports run off the event loop (#874) 2026-10-25 15:17:31 -06:00
inventory The inventory legacy-date repair no longer takes the save lock during import (#915) 2026-11-02 11:58:42 -07:00
map Species: a monthly build of the packs, signed where the key is (#1036) 2026-11-30 15:05:22 -07:00
repos A malformed entry stops a backup preview or merge with an error naming it (#896) 2026-10-27 20:59:49 -06:00
torrents Torrents: refuse to download into the media directory itself (#1038) 2026-11-30 15:05:52 -07:00
videos Channel statistics: read from covering indexes, not video or file_group rows (#1059) 2026-12-01 14:22:21 -07:00
zim iNaturalist species map (#1033) 2026-11-29 19:24:19 -07:00
__init__.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00