This should remove the locking problems and speed up queries to collector database.
Tests passed for python2 and python3
This will create a new commit in order to revert the existing changes.