I would like to comment on what James said.
Most cops are useless with a gun. I would never take advice from one unless I knew him and what he did. And what their department uses is of little consequence.
I have shot in competitions with cops and only one guy could kick my ass. He was Captain of the SWAT team for a large Metro area.
A few years ago I took a four day pistol course at Front Sight in Nevada. If you can afford it, it is very worthwhile. Our instructor was a guy who worked personal protection. His wife did the same job. They have been there, killed others and seen others killed. They are not forced to carry what some bean counter or purchasing agent buys. Their lives depend on the choices they make. They used Glock model 22 pistols. I asked about home defense and they have some 12 ga Mossberg 500's around the house
The instructor told of a buddy of his who was working a detail and got killed. He was carrying a Glock 22. When they examined the gun, it still had rounds in it but they found the trigger had malfunctioned. His buddy had put in an aftermarket trigger to "improve" it...it cost him his life. Keep the gun stock.
As to using a rimfire.... that is a bad choice. Rimfires are prone to misfiring from the priming compound not being evenly distributed around the rim. How many times have you had a FTF, rotated the round 90* and had it go off? If you insist on using a RF, buy Eley or similar high end stuff to carry and practice with the cheap crap.
IMO, most untrained people are better served with a revolver for a carry gun. It is near idiot proof and does have a failure to feed or eject. A trained shooter should select the gun he shoots well and couple it with good ammunition. Caliber is far less important than training and getting rounds in the kill zone quickly. I found I shot better with the 9mm so I swapped out the barrel in the Glock 22 with a 9mm barrel and bought 9mm mags.
Home defense means using a 12 or 20 ga shotgun. BTW, have a set of muffs staged with the gun as you will damage your hearing if you fire it in the house. That instructor mentioned above told me that...he said to get the electronic type that amplify sound. Lastly, NEVER rack a pump shotgun. It is stupid ninja warrior BS. It means you have one less round, it tells the intruder where you are, and it will not scare away a determined adversary.
And if you have to kill someone...do not do a happy dance....do not say I had to kill the *...tell the police your life was threatened and you had to neutralize the threat AND THAT IS IT. Get a lawyer and say nothing else....NOTHING. Be polite about it but do not get sucked in.