The phrase "great deterrent" means something that stops or prevents something else from happening because it is very effective or powerful. Full definition
Studies have found that longer sentences do not have appreciably greater deterrent effects; many serious crimes are committed by people under the influence of alcohol or drugs, who are not necessarily thinking of the consequences of their actions, and certainly are not affected by the difference between a 15 - year and a 30 - year sentence. (businessinsider.com)