True, it may relieve pain temporarily, but as a long term solution it is terrible. First of all, if it is consumed by smoking, you damage your lungs. Inhaling anything other then air into your lungs is harming them. So, a long term consumption via smoking cannabis is looked down upon because of that.
Then, of course, you can consume it as an edible. It's proven to be much healthier, but many professionals claim that prolonged use of cannabis can damage your mind and make you more passive, among other things.