Mattress suggestion?

Hi all, last week when I consulted a doctor for my back pain he prescribed a pain relief ointment and recommended me to check if the mattress is supporting my back.My husband and I have decided to buy a new mattress. Can anyone here please help me choose the right mattress for back pain relief? I surfed and found an article [ ]which says that the height, hardness, size etc does matter. Which one would you prefer latex or gel foam? Please share your suggestions and ideas.