Open
Description
Adding a new column when nullable is relatively cheap and only involves modifying the primary index to add a new storing column without any backfill. Unfortunately, there can be side effects for existing queries that use SELECT *
, since they will now need to join between the primary and secondary index to resolve a row (i.e. finding columns not stored in the secondary index via the primary index).
One good alternative would be to add a new clause on ADD COLUMN so that indexes with STORING columns are all updated to include this column (or a user-selectable subset). This new syntax would update existing secondary indexes to add this new nullable column.
related: #98777
Jira issue: CRDB-31878