How expensive is Lilac's courseware_studentmodule index migration?

From the release notes:

An index was added to the courseware_studentmodule table. This can be a VERY EXPENSIVE MIGRATION which may take hours or days to run depending on size.

We’re interested to obtain some concrete data here to help with planning upgrades. What kind of ‘size’ causes runtimes of ‘hours’?

I put a few details in a comment on the PR:

Update, based on a couple of runs we’ve done:

Two MySQL databases we ran this on both went at about the rate of 2 million rows per minute.

An Aurora instance on AWS RDS completed this without locking the table. Write latency was slightly elevated, but it did not impact users on the site.

A non-Aurora instance on AWS did lock the table, and downtime was required to run this.

My apologies for this one. :frowning: Both for the initial bug and the lack of followup info in the release notes entry.

Thanks @dave , this is just the information we were looking for!