some poller optimisations and a fix for undefined (empty) dbtype which shows up as a mysql error that 'rand' isn't found.