Database open time is really high

Unfortunately I’m blocked because of this so right now this is effectively in standby.

I’ll try to take some time to regenerate a dataset that big to test this branch specifically (and hopefully nothing will break again).