Change condition of users on public email index
What does this MR do and why?
This MR solves for #344806 (closed).
In !72514 (merged) we removed not_null
constraint for public_email
.
The vast majority of users have no public email set. This MR is changing the condition of the index_users_on_public_email
to save storage space by not indexing User records with public_email
set to empty string or NULL
.
Currently the index is set up like this:
CREATE INDEX index_users_on_public_email ON users USING btree (public_email) WHERE ((public_email)::text <> ''::text);
With this MR it will be:
CREATE INDEX index_users_on_public_email ON users USING btree (public_email) WHERE (((public_email)::text <> ''::text) AND (public_email IS NOT NULL));
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Magdalena Frankiewicz