Add index on EbookId

There are several queries that join the `Projects` and `Ebooks` tables.
An index speeds up those joins.
This commit is contained in:
Mike Colagrosso 2024-12-31 21:12:56 -07:00 committed by Alex Cabal
parent eacd7306b0
commit dad5df0059

View file

@ -15,5 +15,6 @@ CREATE TABLE IF NOT EXISTS `Projects` (
`LastCommitTimestamp` DATETIME NULL DEFAULT NULL,
`LastDiscussionTimestamp` DATETIME NULL DEFAULT NULL,
`IsStatusAutomaticallyUpdated` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`ProjectId`)
PRIMARY KEY (`ProjectId`),
KEY `index1` (`EbookId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;