Add missing indexes to improve database query performance (#2950)

This commit is contained in:
Luca Auer
2026-02-14 19:43:31 +01:00
committed by GitHub
parent d17976c910
commit cae9fbf321
7 changed files with 18 additions and 0 deletions
@@ -0,0 +1,9 @@
-- Migration to add performance indexes
CREATE INDEX IF NOT EXISTS idx_mangas_source ON mangas(source);
CREATE INDEX IF NOT EXISTS idx_chapters_url ON chapters(url);
CREATE INDEX IF NOT EXISTS idx_mangas_categories_manga_id ON mangas_categories(manga_id);
CREATE INDEX IF NOT EXISTS idx_mangas_categories_category_id ON mangas_categories(category_id);
CREATE INDEX IF NOT EXISTS idx_excluded_scanlators_scanlator ON excluded_scanlators(scanlator);
CREATE INDEX IF NOT EXISTS idx_manga_sync_manga_id ON manga_sync(manga_id);
CREATE INDEX IF NOT EXISTS idx_history_last_read ON history(last_read);