The largest wall ever built still stands, it is the Great Wall of China. The Great Wall is a massive stone and brick construction that stretches 5,500 miles across the northern part of China. It was built wide enough that 5 mounted soldiers could patrol the top of it. In some places it is only a few feet tall and in others it’s more than 30 feet tall. It took more than 2,000 years to complete.
It’s original purpose was to keep out invaders. It was built with massive fortifications, hence the ability to walk five horses across it abreast of each other. It was only moderately successful.
For starters it took an insanely long time to build the Great Wall. And during that time, the “under construction” parts were nearly always in a state of being attacked by nomadic tribes like the Huns and different warring states that were bordered by the Great Wall.
Construction began in 400 BCE and by 200 CE it had already been overwhelmed not once by twice by nomads from the north. The very nomads it was supposed to keep out. In 1100 CE, nearly 1800 years into the construction of the Great Wall, invaders from the north, brazenly attacked the Great Wall and overwhelmed the fortifications and soldiers stationed at it. The would take over most of Northern China along the Wall and start brand new dynasties.
Even with as large and fortified as the Great Wall of China is, it fell into control by nomads on multiple occasions as did the area of China it was supposed to protect. It only saw moderate successes, definitely not enough to justify the man hours it took to build nor the financial investment by several dynasties that added to the wall, only to find that it didn’t stop them from having their citizens slaughtered by nomadic invaders.