Change monitor.php query to optimize without addl index