2 i, i, i
source | link

So, I need to add a new column of type tinyint to a database table with millions of records. Possible values for the column are 1 or 0. The default value iI would want is 1. But, would setting a default value affect the database performance while the alter table query is running? Or is it better not to set any default value and then backfill by writing a script that backfills the column in batches?

So, I need to add a new column of type tinyint to a database table with millions of records. Possible values for the column are 1 or 0. The default value i would want is 1. But, would setting a default value affect the database performance while the alter table query is running? Or is it better not to set any default value and then backfill by writing a script that backfills the column in batches?

So, I need to add a new column of type tinyint to a database table with millions of records. Possible values for the column are 1 or 0. The default value I would want is 1. But, would setting a default value affect the database performance while the alter table query is running? Or is it better not to set any default value and then backfill by writing a script that backfills the column in batches?

1
source | link

Is there any performance gain due to not setting a default for a new column in Mysql?

So, I need to add a new column of type tinyint to a database table with millions of records. Possible values for the column are 1 or 0. The default value i would want is 1. But, would setting a default value affect the database performance while the alter table query is running? Or is it better not to set any default value and then backfill by writing a script that backfills the column in batches?