Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notes on created referenced columns.
In #9 I benchmarked how long it would take to create a referenced column depending on the amount of data in the tables. It became clear that if the table is empty, it does not lock both tables for long at all even when validating, presumably because there isn't anything to validate. However, once there is data in the table the time will start to matter much more. At a scale of 1 million records to validate during column creation, it could be ~50 milliseconds which may not be noticeable enough. However at the scale of 100 million records, it can take seconds which will likely cause concurrent writes to time out. Therefore, err on the side of safety and separate constraint validation from referenced column creation when there is any data in the table.
- Loading branch information