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:
Scott Lamb
2017-02-12 20:37:03 -08:00
parent 3314673b8f
commit da4e439b9c
5 changed files with 99 additions and 42 deletions

View File

@@ -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),