mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-09 00:02:48 +03:00
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:
committed by
Nicolas Mowen
parent
11b4d34f93
commit
d6b93301e2
@@ -0,0 +1,21 @@
|
||||
"""Peewee migrations -- 039_add_perf_indexes.py.
|
||||
|
||||
Adds a composite (camera, start_time) index to speed up single-camera queries
|
||||
issued by the web UI.
|
||||
|
||||
"""
|
||||
|
||||
import peewee as pw
|
||||
|
||||
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")'
|
||||
)
|
||||
|
||||
|
||||
def rollback(migrator, database, fake=False, **kwargs):
|
||||
migrator.sql('DROP INDEX IF EXISTS "event_camera_start_time"')
|
||||
Reference in New Issue
Block a user