Guess I might go another way. Not trying to stir controversy but I would just get a .22 for range shooting but for home defense, I would do a short barreled 12 gauge with a full spread bore using buckshot. I suppose you could do slug too. Shotguns are fairly cheap compared to some pistols, depending on what you get of course. You can get additional barrels and can have a good time skeet shooting, deer, or bird hunting.
The other nice thing with a shotgun is since it spreads, you do not have to be all that accurate, plus the psychological aspect of pumping a round into the chamber will usually either make an invader freeze or run in fear. If they do not run, good chance they may be hopped up on something and in which case, not many human bodies will withstand a blast from a 12.
Otherwise if a shot gun is not your bag, I second the big plated revolver. Cocking that hammer has close to the same effect as chambering a shell.
Bottom line is I believe you only get 1 shot to stop your attacker, you must make it count. Unless you shoot with it a lot(for accuracy)and have an excellent load, a 9mm is not that round. As stated before, a 357 will usually allow you to practice with 38 and that work good as for short range, accuracy between the 2 shouldn't be too much. Otherwise, .44, .454, or .45 would be the loads I would prefer for home defense if I did not use a shotgun.
just my thoughts