Better private db index

This commit is contained in:
Ajay 2022-02-21 21:57:57 -05:00
parent 6b1fa7f5d0
commit 90fc02e340
2 changed files with 9 additions and 7 deletions

View file

@ -1,13 +1,8 @@
-- sponsorTimes
CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedIP"
CREATE INDEX IF NOT EXISTS "privateDB_sponsorTimes_v3"
ON public."sponsorTimes" USING btree
("hashedIP" COLLATE pg_catalog."default" ASC NULLS LAST)
TABLESPACE pg_default;
CREATE INDEX IF NOT EXISTS "privateDB_sponsorTimes_videoID_v2"
ON public."sponsorTimes" USING btree
("videoID" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
("hashedIP" COLLATE pg_catalog."default" ASC NULLS LAST, "videoID" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
;
-- votes

View file

@ -0,0 +1,7 @@
BEGIN TRANSACTION;
DROP INDEX IF EXISTS "sponsorTimes_hashedIP", "privateDB_sponsorTimes_videoID_v2";
UPDATE "config" SET value = 6 WHERE key = 'version';
COMMIT;