Add indexes to better support certain queries

This commit is contained in:
eikek 2021-08-28 19:11:13 +02:00
parent 9812b8f6c8
commit a5a8c2553b
3 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,3 @@
CREATE INDEX "joblog_id_created_idx" ON "joblog"("jid", "created");
-- H2 doesn't support coalesce in create index
--CREATE INDEX "item_itemdate_created_idx" ON "item"(coalesce("itemdate", "created"));

View File

@ -0,0 +1,3 @@
CREATE INDEX `joblog_id_created_idx` ON `joblog`(`jid`, `created`);
-- MariaDB doesn't support coalesce in index
--CREATE INDEX `item_itemdate_created_idx` ON `item`(coalesce(`itemdate`, `created`));

View File

@ -0,0 +1,2 @@
CREATE INDEX "joblog_id_created_idx" ON "joblog"("jid", "created");
CREATE INDEX "item_itemdate_created_idx" ON "item"(coalesce("itemdate", "created"));