How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory
When a SQL Server Express-based factory app started crawling, the culprit wasn’t hardware or network — it was a decades-old WHILE loop migrated from C/C++ to SQL. This real-world story breaks down how procedural habits, memory grants, and lack of window functions nearly derailed a production floor.