I also agree with mljdeckard.
Under stress one defaults to one's level of training. By getting training and practicing diligently (training teaches you what to practice), the physical skills can become reflexive -- you will be able to perform them properly, consistently, on demand without conscious thought.
Also, competition (IPSC and IDPA) can be very useful, if you approach with a good attitude and understand it's limitations. It is not the way to learn self defense or tactics. It is a very good way to practice the basic skills, e. g., good gun handling, moving safely with a loaded weapon, quick target identification and acquisition, shooting fast and accurately, engaging multiple targets, shooting from unconventional postures, shooting and moving, reloading, etc., all under some stress. Competition imposes an element of stress since it's, first of all, competition, and you'll be doing everything on the clock under the eyes of the Range Officer (and everyone else).
Competition is not combat. But it's also not standing at a table doing static shooting.