From 634d5d083a5be747edbc7773e7d0518d9e991b34 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sat, 14 May 2022 15:43:38 -0400 Subject: [PATCH] Better indexes --- databases/_sponsorTimes_indexes.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/databases/_sponsorTimes_indexes.sql b/databases/_sponsorTimes_indexes.sql index e604574..cd22b93 100644 --- a/databases/_sponsorTimes_indexes.sql +++ b/databases/_sponsorTimes_indexes.sql @@ -15,14 +15,14 @@ CREATE INDEX IF NOT EXISTS "sponsorTimes_UUID" ("UUID" COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedVideoID_gin" - ON public."sponsorTimes" USING gin - ("hashedVideoID" COLLATE pg_catalog."default" gin_trgm_ops, category COLLATE pg_catalog."default" gin_trgm_ops) +CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedVideoID" + ON public."sponsorTimes" USING btree + (service COLLATE pg_catalog."default" ASC NULLS LAST, "hashedVideoID" text_pattern_ops ASC NULLS LAST, "startTime" ASC NULLS LAST) TABLESPACE pg_default; CREATE INDEX IF NOT EXISTS "sponsorTimes_videoID" ON public."sponsorTimes" USING btree - ("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST, category COLLATE pg_catalog."default" ASC NULLS LAST, "timeSubmitted" ASC NULLS LAST) + (service COLLATE pg_catalog."default" ASC NULLS LAST, "videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "startTime" ASC NULLS LAST) TABLESPACE pg_default; CREATE INDEX IF NOT EXISTS "sponsorTimes_description_gin"