From 74607b7e6042c8ae31ae235ada674b5814dc0383 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 31 Jan 2019 17:43:01 -0800 Subject: [PATCH] Index (author, download) so that listing all channels is faster. --- ycdl/ycdl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ycdl/ycdl.py b/ycdl/ycdl.py index 6df4207..b0dec1c 100644 --- a/ycdl/ycdl.py +++ b/ycdl/ycdl.py @@ -61,6 +61,7 @@ CREATE TABLE IF NOT EXISTS videos( CREATE INDEX IF NOT EXISTS index_channel_id on channels(id); CREATE INDEX IF NOT EXISTS index_video_author on videos(author_id); +CREATE INDEX IF NOT EXISTS index_video_author_download on videos(author_id, download); CREATE INDEX IF NOT EXISTS index_video_id on videos(id); CREATE INDEX IF NOT EXISTS index_video_published on videos(published); CREATE INDEX IF NOT EXISTS index_video_download on videos(download);