created index for discovered_on to speedup statistics
This commit is contained in:
parent
3960915812
commit
c96cb7de0e
@ -251,6 +251,8 @@ def initialize_magneticod_db() -> None:
|
||||
with magneticod_db:
|
||||
magneticod_db.execute("PRAGMA journal_mode=WAL;")
|
||||
|
||||
magneticod_db.execute("CREATE INDEX IF NOT EXISTS discovered_on_index ON torrents (discovered_on);")
|
||||
|
||||
magneticod_db.execute("CREATE VIRTUAL TABLE temp.fts_torrents USING fts4(name);")
|
||||
magneticod_db.execute("INSERT INTO fts_torrents (docid, name) SELECT id, name FROM torrents;")
|
||||
magneticod_db.execute("INSERT INTO fts_torrents (fts_torrents) VALUES ('optimize');")
|
||||
|
Loading…
Reference in New Issue
Block a user