How would you optimize a script that processes millions of daily sensor readings from AMD Construction Group heavy machinery?