This is fairly hard to measure because the Great Wall had significant features besides being a big pile of bricks between one group of people and another. It facilitated moving troops, early warnings, long distance communications, etc. The article above makes this point more strongly - the Wall is not a border fence, if you want to put it that way, but rather the name of a collection of fortifications in Northern China.
Qin Shi Huang's first massed walls was built against the Xiongnu. This applies to them as much as it does the Jurchens and Mongols - walls are very effective against horses. By the time Mongols were fielding Arab siege equipment in China, they were well south of what we consider the Wall. Han-Xiongnu treaties almost certainly relied on fortified border, because it prevented raiding, the pastime and livelihood of nomads the world over. The Wall, however, has little effect on the mobility of nomad armies, which would prefer to move along roads anyway.
The Wall isn't even recorded in the annals of the Mongol conflicts, to my knowledge, because the Mongols were so much more mobile and powerful on open field than their opponents that there was virtually no ability to push back against them, and actually use the Wall as meaningful fortification. They spent decades stymied in sieges where they hadn't the tools or raw manpower to break them - against the Jin, the Song really broke the siege for the Mongols, and against the Song, a combination of betrayal and newfangled Arab and Persian engineering won the day.
The Ming Wall, extensive and planned as it was, actually worked like a wall, funneling nomad armies into well-defended corridors and fortified passes. That didn't stop the Manchu raiding, but the Manchus had to bypass the wall to wage a full-scale war. By that point they were powerful enough to conquer the entire south.
I actually ended up writing a whole Wikipedia article after my search for the answers to this question, so if you're interested in the whole history of the "Great Wall" with its rise and fall, see here: https://en.wikipedia.org/wiki/History_of_the_Great_Wall_of_China
I also wrote something shorter for a feature thread some time ago, let me dig it up:
Interestingly, the Great Wall isn't that much of a success at all! To gauge how much of a success or a failure it was, it's a good idea to understand for why and how it was built. A word on terminology first: What we see today as "the Great Wall" was a Ming dynasty construction (the most famous stretches around Beijing were built in the 16th century), but nowadays we use the term "Great Wall" (or changcheng in Chinese) to refer to the various ramparts built in the north since the Qin dynasty (2nd century BC). The early Great Walls of the Qin and its predecessors were not walls of defense - they were built to wall off newly acquired territory. These walls never really worked out for them because when the Qin was hit with rebellions, these walls were abandoned and the nomads got back in to resettle the area. The take away point from this is that any wall needs to be manned adequately for it to be effective, no matter what purpose it serves.
The Ming dynasty walls did not rise out of a conscious concerted policy, rather, it was born out of a "failure of policy". Unable to eliminate the Mongol threat and unwilling to negotiate with them, the imperial court does not know how exactly to deal with the problem, so the commanders in charge of the northern frontier regions built walls to defend their areas of responsibility as they were an imperially acceptable compromise. The first walls in the Ordos region merely redirected the Mongol raids to other areas, and so the commanders of those other areas built walls of their own. These piecemeal constructions eventually joined together into the semi-continuous "Great Wall of China" today. There wasn't one emperor or one minister who one day decided to wrap China in wall and be done with it, the Great Wall was something that eventually came to be.
If there wasn't a "wall mentality" in the beginning, there certainly was after Altan Khan rode around the newly built walls and raided the suburbs of Beijing in 1550. Much effort was spent filling in the gaps in the already mountainous region, with a Ming official explaining that the goal should be to "not let a single horse in". Even so, some Mongol raiders climbed through treacherous terrain and killed a number of high ranking military officers in 1576, making the incident severe enough to warrant even more drastic measures, such as this confounding stretch of wall above a cliff called the Stairway to Heaven. Wall constructions continued all the way until the end of the Ming dynasty in 1644.
So how did it work out? The most famous episode of its "failure" is when Wu Sangui, the last defender of the Great Wall at Shanhai Pass, opened the gates and let the Manchus march into Beijing in 1644, beginning the Qing dynasty. Some people point to this and say the Great Wall was never tested and only fell to treachery, but the reality is that Beijing already fell to internal rebels and Wu Sangui was caught between two enemies within and without the Wall, so he essentially had to pick a side. More importantly, the Manchus had breached the Great Wall several times before 1644 and made raids around Beijing and as far south as the Shandong peninsula! How were the Manchus able to puncture the walled border, seemingly at will? I will again emphasize that any wall needs to be manned adequately for it to be effective. By the end of the Ming, fighting men were needed all over the empires to deal with internal revolts (as the Ming economy broke down due to various factors) and the Manchu threat. There simply wasn't enough men (or the money to pay them) to man the whole length of the Wall, so the bulk of the defenders were at Shanhai Pass. The Manchus simply rode around and attacked the lesser defended passes. In light of this, the Great Wall of China was certainly a failure as the resources spent on building the wall could well be used on other things like paying the soldiers, critically, and a unmanned wall was not going to defend itself.
Supplementary question: Are there any decent books about the Great Wall?