38
Complex Batch Routine
uCalculate and distribute sales goals to a sales force. 
ØAlgorithm driven by parameters for each salesperson and region stored in the database.
ØUser interface built in Java
ØAll calculations were done in Java.
ØRoutine consisted of 40 classes, about 10,000 lines of code, and required six weeks to write.
uMost significant performance problems were due to poorly coded SQL.
uSignificant changes to the algorithm were required,
ØDiscard existing Java and rewrite it as a database-side routine.