SQL Practice Logo

SQLPractice Online

Level 6 - ExpertOptimization Questionsm5 schema evolution

Optimization: Batch Backfill Pattern

Pick the better SQL style for large backfill jobs. Query A: UPDATE orders SET region_code = 'NA' WHERE region_code IS NULL; Query B: UPDATE orders SET region_code = 'NA' WHERE id >= :start_id AND id < :end_id AND region_code IS NULL;