Very slow database performance

Ah. I see. It’s the server-code startup lag, not the database lag.

Server-code startup lag has been discussed elsewhere to good effect.