Instant deploy requests
By Shlomi Noach |
PlanetScale now offers instant deployments in eligible deploy requests, cutting down schema deployment runtime to near-instant. This option is opt-in per deploy request, and we continue to offer Online DDL as the default and safest schema change strategy.
To qualify for instant deployment, a deploy request must consist of changes all of which can be fulfilled instantly:
- One or more
ALTER TABLE
statement that qualifies forINSTANT
DDL in MySQL. - Plus, optionally, creating or dropping any number of tables.
- Plus, optionally, creating, modifying, or dropping any number of views.
To learn more about INSTANT
DDL in MySQL, see our breakdown on The State of Online Schema Migrations in MySQL. In short, there is a limited set of changes for which MySQL supports the INSTANT
algorithm, such as adding a new column, changing a column's default value, and more.
In some such cases, an Online DDL operation may take hours to deploy a schema change to a large tables, where an instant deployment may take just a few seconds. PlanetScale pre-evaluates whether a deployment is eligible for instant deployment and presents the user with a choice.
Instant deployments do come with some caveats:
- They are not revertible.
- Under some workloads, users may experience a multi-second (or more) lock on the migrated table.
For these reasons, PlanetScale continues to run Online DDL as the default strategy, and users are asked to make an explicit choice when opting for instant deployments.