I need to set all values of a given column
foo to a constant varchar
bar. Is there a faster way to do that than with the vanilla
UPDATE mytable SET foo = 'bar'?
- This is an Oracle MySQL 8.0.20 server (via
- This table uses the InnoDB engine
- The column is not part of any index
- The column datatype is
- I can't change the datatypes
- I have full access to the server and could manipulate the
.idbfiles directly, if necessary.
- The largest table has ~1.7mi records and the regular update takes ~30mins
- Memory, CPU and storage doesn't seem to be a bottleneck, so far (checking
Note: I need to do similar updates to multiple columns in multiple tables, but what I describe here applies to them all, except for the datatype, which is the worst case (all the other columns are also
varchar, but not that long).