From 23f57242339d226ff6aa40730f3317a1201ea125 Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Thu, 18 Feb 2021 08:55:39 -0800 Subject: [PATCH] Drop unused index from issuedNames table (#5290) Drop the reversedName_renewal_notBefore_Idx from the issuedNames table. This index was added to facilitate rate limit queries, but we now use the certificatesPerName table for rate limits instead. Keep the reversedName_notBefore_Idx in place, as it is still useful for gathering stats on how many hostnames have active certificates. Fixes #3180 --- .../migrations/20210216114200_IssuedNamesDropIndex.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sa/_db-next/migrations/20210216114200_IssuedNamesDropIndex.sql diff --git a/sa/_db-next/migrations/20210216114200_IssuedNamesDropIndex.sql b/sa/_db-next/migrations/20210216114200_IssuedNamesDropIndex.sql new file mode 100644 index 000000000..f52d70d8b --- /dev/null +++ b/sa/_db-next/migrations/20210216114200_IssuedNamesDropIndex.sql @@ -0,0 +1,10 @@ + +-- +goose Up +-- SQL in section 'Up' is executed when this migration is applied + +ALTER TABLE issuedNames DROP INDEX `reversedName_renewal_notBefore_Idx`; + +-- +goose Down +-- SQL section 'Down' is executed when this migration is rolled back + +ALTER TABLE issuedNames ADD INDEX `reversedName_renewal_notBefore_Idx` (`reversedName`,`renewal`,`notBefore`);