mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-26 20:38:43 -05:00
benchmark camera page, fix broken schema
This page was noticeably slower than necessary because the recording_cover index wasn't actually covering the query. Both the schema for new databases and the upgrade query were broken (and not even in the same way). No new schema version to correct this, at least for now. I'll probably have another reason to change the schema soon anyway and can throw this in.
This commit is contained in:
@@ -72,11 +72,15 @@ pub fn run(tx: &rusqlite::Transaction) -> Result<(), Error> {
|
||||
check (composite_id >> 32 = camera_id)
|
||||
);
|
||||
create index recording_cover on recording (
|
||||
camera_id,
|
||||
start_time_90k,
|
||||
duration_90k,
|
||||
video_samples,
|
||||
video_sync_samples,
|
||||
video_sample_entry_id,
|
||||
sample_file_bytes
|
||||
sample_file_bytes,
|
||||
run_offset,
|
||||
flags
|
||||
);
|
||||
create table recording_playback (
|
||||
composite_id integer primary key references recording (composite_id),
|
||||
|
||||
Reference in New Issue
Block a user