If you suffer from knee pain and are also significantly overweight, consider trying to lose the weight before taking more drastic steps such as knee surgery.
Losing weight can help people who suffer from knee arthritis. The extra weight is putting stress on your weight bearing joints. If you know your knee pain is due to arthritis, than losing weight may cure the condition. Several studies have shown this to be the case.
For an example of one man who was considering knee surgery but lost fifty pounds in twelve weeks instead (via a change in diet and exercise) and cured his knee pain, see a previous post here on Michael Becker.
Your doctor would be the best person to consult about this, but I would think that before opting for knee joint surgery, most people should probably consider weight loss (if overweight), increased appropriate exercise, glucosamine and/or the wearing of an unloading knee brace.
Unloading braces ('valgus knee braces') were developed about ten years ago and are often recommended to people who have knee pain due to osteoarthritis. To the extent that they can help reduce pain they can also be used by people who want to exercise in order to lose weight but find it too painful to do so because of knee pain.