Skip to content

Drop initial prepared_at index, and create one with created_at

Marc Shaw requested to merge prepared_at_created_at_index into master

What does this MR do and why?

Initially we were going to query for every prepared_at = NULL row, but now we are going to do it based on the created_at time too.

We have a current index which is ID, and prepared_at = NULL.

This query is going to be run with each_batch logic, for example: !121999 (diffs) (but also with where created_at > 1.day)

Following this guide, this is the creation of the new index, and dropping of the old index.

https://docs.gitlab.com/ee/development/database/adding_database_indexes.html#schedule-the-index-to-be-created

Follow up drop issue: #419917 (closed)

Follow up add issue: #419918 (closed)

Edited by Marc Shaw

Merge request reports