For me I find that applying a cold ice pack to the affected knee helps reduce inflammation, pain and swelling.
The pain goes away after applying the cold ice pack and then I also use heat after I apply the cold ice pack.
I use a heating pad wrapped around the knee because the heat helps relax the muscles, lubricates joints and helps get rid of muscle stiffness.
So I would recommend using both heat and cold for joint pain as it's what works best for me.