Skip to content

Resolve "Add Index for `free_user_cap_over_limit_notified_at`"

What does this MR do and why?

Add index to speed up queries workers use for notifying over limit users. See related issue for details

Add Index for `free_user_cap_over_limit_notifie... (#397718 - closed) • Sam Figueroa • 15.11

Database query example using this can be found in MR description here: !111312 (merged)

Screenshots or screen recordings

Screenshot_2023-03-14_at_09.09.11

How to set up and validate locally

Steps

  1. run rails db:migrate
  2. check database
  3. run gdk psql
  4. run \d namespace_details

Or

  1. access Joe instance on DatabaseLab
  2. run exec CREATE INDEX index_fuc_over_limit_notified_at ON namespace_details (free_user_cap_over_limit_notified_at);
  3. check database \d namespace_details

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #397718 (closed)

Edited by Sam Figueroa

Merge request reports

Loading