How to reduce CPU usage on a database sensor