From 01e188208363edafd840b028f021e9e3d3391116 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 27 Oct 2023 10:31:39 +0100 Subject: [PATCH] More indexes --- plugins/tiddlywiki/sqlite3store/sql-functions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tiddlywiki/sqlite3store/sql-functions.js b/plugins/tiddlywiki/sqlite3store/sql-functions.js index c6b10ab8c..b39d0d449 100644 --- a/plugins/tiddlywiki/sqlite3store/sql-functions.js +++ b/plugins/tiddlywiki/sqlite3store/sql-functions.js @@ -82,6 +82,8 @@ $tw.SqlFunctions = function(options) { FOREIGN KEY (tag_id) REFERENCES tags (tag_id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (title, plugintitle, tag_id) ); + CREATE INDEX IF NOT EXISTS tiddler_tags_title_index ON tiddler_tags(title); + CREATE INDEX IF NOT EXISTS tiddler_tags_plugintitle_index ON tiddler_tags(plugintitle); CREATE INDEX IF NOT EXISTS tiddler_tags_tag_id_index ON tiddler_tags(tag_id); ` });