I'd venture to suggest that consider the fact most of us will never encounter a situation in our lifetimes where having a firearm available for defensive reasons is necessary, the question becomes somewhat more complex than a black or white decision regarding the nature of the firearm. Where I live, carrying a pistol is legal only for law enforcement, armoured car personnel, and a very few private security officers or other citizens who have been granted special exceptions to carry in certain circumstances. So it's a moot point here, nation-wide. In terms of actual utility, it seems unlikely that most Canadians will ever actually need a pistol for personal defence. The most notable exceptions are a) those who hunt or trap in the wilderness (and those people are often granted an exception for use against bears or mountain lions), and b) those who are involved in criminal gangs, whose lifestyle choices have made them vastly more likely to become targets of violence. For a), as I mentioned, exceptions can be applied for and are often granted. For b), I have no empathy, as they're getting what they asked for when they signed up as gangsters.
Of course there are many of us who may fall victim to violent injuries or death related to a) or b). Going for a hike or camping trip often results in large predator encounters. For such things the 'weapons' which have the best track record are 'bear bangers' (a pen gun which launches a small explosive high above the person and the bear resulting in a very loud explosion which usually scares away the bear) and bear spray, which when used properly in a low Z pattern usually results in a successful repelling of the animal, with a very small percentage of failures, much lower than the rate of failure to defend oneself even when compared to statistics where hunters have used long rifles in self defence against a charging bear or jumping lion. It's harder to miss when creating a wall of irritating spray, compared to putting one bullet through a fast-moving animal while in a panicked state. Still, the odd person does get severely injured or dies as the result of a wild animal attack, even when deploying both bear banger and pepper spray. Very tiny numbers, similar to shark attacks, which are extremely rare.
Similarly, injuries and occasionally fatalities can result from being in the 'wrong place' when gangland idiots decide to start shooting up a street, restaurant, or home. These guys are not known for precise marksmanship. Bullets mostly hit unintended targets, the vast majority of these being vehicles, walls, and dirt. But the odd person dies or suffers a permanent injury. And that's sad. But there's really not a lot to be done about it as a 'defender' considering that it is exceedingly rare for such shootings to give bystanders any warning, nor time to shoot back, besides which it should be fairly obvious that involving oneself in a gang shootout will typically result in becoming the direct target rather than a potential incidental backstop for their nonsense. Finding cover seems the best practice, both in theory and in actual events recorded. Get the heck out of there and let the idiots kill each other, and let the police do their job trying to eliminate such organizations. Unless of course one is planning on becoming a superhero with a gun... but that's a dangerous road, and an illegal one in Canada.
As for the USA, my take on it is typically long-winded... but I'll try to be brief. If you happen to have drawn the short straw in terms of where you live, meaning you're surrounded by gangsters and have little in the way of financial or other means to get the heck away to a better place to live, then perhaps carrying a pistol or at least having one beside your bed is the best option. Considering slow police response times, if home invasions are daily events where you reside, such a tool is indeed important. Where I live home invasions ONLY happen to gang-involved people, well... okay, VERY rarely the very rich are targeted, but the odds are much longer than winning a major lottery. But I've read enough reports regarding attacks in many US cities to understand that, while not so bad as urban Brazil or Honduras, there are a lot of places in the US which have become essentially low level war zones.
In such a case I'd consider a large calibre handgun essential, at least in the home. For carrying, whatever can be concealed and provide a reliable dump of at least 3 or 4 shots on a close up target would seem important. If concealment of a large calibre handgun isn't a problem for the individual, by all means carry such a weapon if your daily life takes you through areas where a potentially fatal attack is around every corner... but also consider finding ways to avoid such areas if at all possible.
But if all the defender can comfortably manage is a .22lr compact pistol then so be it. Load it with Stingers (CCI reliability being among the best), shoot it regularly and keep it well maintained, learn to handle it with the same familiarity as you have with tying your shoes, brushing your teeth, putting on a seat belt. It should be second nature, such that a precise and deliberate series of shots happens almost without thinking in a true emergency where such violence is necessary. And work on your attitude such that panic and freezing become unlikely. Understanding your own response to truly stressful emergent situations is critical. The majority freeze. It's the sad reality. I've seen it time and again, especially among drivers, where life and death is constantly an issue and yet most will completely lock up when someone does something unexpected in front of them. Our provincial insurance agency is going broke in large part because of such 'accidents.' Most people are psychologically unprepared for stress. For such people I'd suggest sensible footwear, lots of jogging, and running like hell when things go sideways. Easier to train for that than to train for killing someone.
As has been demonstrated time and again, being shot with almost anything tends to dissuade all but the most hardened of criminals. And those 'hard men,' the sort who are familiar with stabbing fellow inmates to death with a sharpened toothbrush for example, are not likely to be intimidated by any weapon, even a Desert Eagle, as they'll just do what they know best and either evade or kill you anyway before you get a shot off. These guys tend to be ready for counter-attacks, so a shootout with such a person is very unlikely to succeed. Still, it's your choice. I'm just saying that even a tiny pistol is going to be effective in ending an attack by most assailants. So it comes down to more what's comfortable to carry and use for each individual, more than what's optimal for big game stopping power. I'd never consider a .22lr suitable for self defence against bears and mountain lions in the back country... so I carry bear spray and a bear banger.