mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Add indexes to creational tables (#6974)
This commit is contained in:
parent
032aa64195
commit
b4981058a2
@ -15,6 +15,9 @@ CREATE TABLE chapters(
|
|||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX chapters_manga_id_index ON chapters(manga_id);
|
||||||
|
CREATE INDEX chapters_unread_by_manga_index ON chapters(manga_id, read) WHERE read = 0;
|
||||||
|
|
||||||
getChapterById:
|
getChapterById:
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM chapters
|
FROM chapters
|
||||||
|
@ -9,6 +9,8 @@ CREATE TABLE history(
|
|||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX history_history_chapter_id_index ON history(history_chapter_id);
|
||||||
|
|
||||||
resetHistoryById:
|
resetHistoryById:
|
||||||
UPDATE history
|
UPDATE history
|
||||||
SET history_last_read = 0
|
SET history_last_read = 0
|
||||||
|
@ -22,6 +22,9 @@ CREATE TABLE mangas(
|
|||||||
date_added INTEGER AS Long NOT NULL
|
date_added INTEGER AS Long NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX library_favorite_index ON mangas(favorite) WHERE favorite = 1;
|
||||||
|
CREATE INDEX mangas_url_index ON mangas(url);
|
||||||
|
|
||||||
getMangaById:
|
getMangaById:
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM mangas
|
FROM mangas
|
||||||
|
Loading…
Reference in New Issue
Block a user