Real-time optimization responding to changing plant and market conditions is a distinctive aspect of manufacturing. The data-driven approach involves a prediction-optimization. The regressions are learned from sensor data and used to compute set points for control variables over a lookahead horizon to optimize production-related KPIs. However, negligent usage may lead to surprising inconsistencies. We detail pitfalls, including systematic error between models and current conditions, a mismatch between projection and actual response, and sensitivity of values used for non-control variables. We find that regression and optimization are not separable and recommend development jointly.