It depends on your
vitamin D levels. If you have severe deficiency it will take couple of months to see improvement if you are taking the right medications.
Eat
calcium rich diet which will be mainly dairy products, have adequate sun exposure and take medications as prescribed which will all improve your vitamin D levels.
If joint pains persist after 1-2 months despite treatment, consult your doctor again to look out for any other causes of joint pains.