The sooner people with diabetes start taking metformin, the longer the drug remains effective, according to a new study.