added debounce to avoid executing a sql query for each mouse movement