Miscellaneous fixes (#24179)

* rename migration

* use ASC composite index for event camera and start_time

the planner still picks for newest-first single-camera queries but doesn't slow down full per-camera scans on a cold cache

* pause playback while the timeline range handles are up

* reduce multi camera seeded export range to 30m

allows both handlebars to fit within most desktop windows
This commit is contained in:
Josh Hawkins
2026-09-12 07:30:04 -06:00
committed by Nicolas Mowen
parent 11b4d34f93
commit d6b93301e2
3 changed files with 32 additions and 28 deletions
@@ -1,6 +1,6 @@
"""Peewee migrations -- 036_add_perf_indexes.py.
"""Peewee migrations -- 039_add_perf_indexes.py.
Adds composite/single-column indexes to speed up single-camera queries
Adds a composite (camera, start_time) index to speed up single-camera queries
issued by the web UI.
"""
@@ -13,7 +13,7 @@ SQL = pw.SQL
def migrate(migrator, database, fake=False, **kwargs):
migrator.sql(
'CREATE INDEX IF NOT EXISTS "event_camera_start_time" '
'ON "event" ("camera", "start_time" DESC)'
'ON "event" ("camera", "start_time")'
)