Does the duration of breast feeding matter?

Does the duration of breast feeding matter?