• Regardless of the "perfect" SQL for this task, 35 minutes is sufficiently better than 20 hours that the solution in the article is certainly good enough. If it generalizes better than an ideal but single-purpose query, then (imo) it has better reusability.

    What is valuable in this article is that a problem is broken down and explained so we can see WHY the solution works so much better than the original example.

    I would be interested in the performance/timing of setting the default value to a UDF at creation of the column? (which could be removed after the initial load)