mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
Add SQLite indexes for contenus page language/tag queries + WIP: Peertube orphans, dialogs, contact decoupling, context note, finality types
This commit is contained in:
1 parent
0d5e9dac19
commit
03c9c3566f
38 files changed
+1432
-333
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- 041: Add index on thesis_languages(language_id) for contenus page performance.
|
||||
--
|
||||
-- The contenus page queries getAllLanguagesWithCount() and searchLanguages() join
|
||||
-- languages → thesis_languages on language_id. SQLite's PRIMARY KEY on
|
||||
-- (thesis_id, language_id) cannot optimize a lookup by language_id alone, so
|
||||
-- it builds an AUTOMATIC COVERING INDEX per query. This persisted index
|
||||
-- removes that overhead.
|
||||
--
|
||||
-- Also adds a covering index on tags(deleted_at, name) to accelerate
|
||||
-- getAllTagsWithCount() and searchTags() ORDER BY clauses (avoiding temp B-tree).
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_thesis_languages_language
|
||||
ON thesis_languages(language_id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_tags_deleted_name
|
||||
ON tags(deleted_at, name);
|
||||
Reference in new issue
Block a user