Why are there 2 database threads?