Multithread logik for DB