Total size of the codebase doesn’t matter. Everything a new programmer touches is either shared by other parts of the system or it’s not. If it’s shared, the new guy probably shouldn’t be touching it anyway. If it’s not shared, it should be small and self-contained enough to learn it quickly.
Now if you’ve got a guy in his first month who says he needs to re-write your DB access class before he can do anything productive, then you’ve got a whole different problem than just getting him up to speed. (And if he’s right about it needing to be re-written, the problem isn’t with the new guy.)