The 'whole 9 yards' expression, if my history is correct, goes back to World War 2. When planes were in a dogfight, the pilots would want to give their enemy the 'whole 9 yards' meaning the full length of a machine gun ammunition belt (27 feet) or use up their bullets in their entirety.
And that concludes todays' history lesson.