Certainly better than nothing at all. I don't think your average bad guy is going to study it long enough and say "oh it's just a .22" Hopefully they are smart enough to run if they see it. Then it has done its job.
That is not an EDC's job. An EDC isn't supposed to scare people off. That logic is fundamentally flawed and can get you in big trouble. It's natural to think presenting a gun will be enough but it's unlawful and it's not taught well enough.
Brandishing a firearm is felony.
You are not permitted to draw or "brandish" your firearm to intimidate or scare. To legally draw your firearm it must be to save your life or someone else's. So, when you draw you must have already have determined the use of deadly force is necessary. Consider that for a minute. When you reach for your gun you must have already determined you are going to shoot to save a life. Now, you can choose not to use it, and would be wise to do so if the attacker runs off. But if you draw thinking he'll run and you wont need to use it you have committed a felony.
You are under the exact same legal responsibly to prove you were in imment danger if you shoot or don't shoot. So be sure before you draw.
Maybe there are some good CCW trainers who chime here?