Depends. The solution should fit the problem. Short term pain from surgery often works best with narcotics for 24-48 hours. Longer pains require understanding of the problem. NSAIDS are not a good choice if you have Diabetes, Heart Disease, Bleeding tendency, or Hypertension. Sometimes changing lifestyle - to get the diet, sleep, activity and stress under control- is the best long term solution. .
Depends on what. You need the pain medication for. The medication will differ depending on whether the pain is neuropathic, inflammatory, myofascial, etc. Different medications will treat different pains more effectively.