Friction reduction optimization for extended reach and horizontal wells