If you simply consider the number of people, it belongs to the era of cold weapons, and 20,000 people are no better than hundreds of thousands of people in any case. But what is strange is that the achievements made by the Tang soldiers are incomparable to those of the Song Army.
All this, obviously, is not caused by a single cause.

First, the decline of the Silk Road
Until the Tang Dynasty, the significance of the Western Regions to the Central Plains was extraordinary. After Zhang Qian's passage through the Western Regions, after centuries of exploration, an economic bond from Chang'an to the Mediterranean Sea was gradually formed. At that time, the world powers were almost all connected by this road.
Silk and porcelain from the Central Plains were constantly traded; in addition to bringing back a large amount of gold and silver currency, they also brought back spices, works of art, and various animals and plants of strategic importance to the country.
Such a passage is worth fighting to the death to maintain. Datang garrisoned 20,000 troops in the western region, which is already the limit of national strength.
Relevant information shows that once grain and grass are transported to the western region, it takes 6 months to 1 year on the road. Along the way, in addition to people eating horses, the materials that can be delivered are often not saved.
According to this calculation, the expenditure of feeding 20,000 troops in the western region can even feed 200,000 troops if they are placed in the Central Plains.
In any case, 20,000 troops releasing the western region is not enough to see. In order to achieve the purpose of running the Western Regions, the Western Regions Have unimaginable powers, and they can often make a decision on the countries of the Western Regions, dividing them, or declaring war.
This constituted a system operated by the Western Regions, in which the Chang'an Imperial Court authorized the Capital Protectorate to deter servants from serving the army.
Although the efficiency is very high, it has to be said that the Western Regions Have become the de facto Emperor of the Earth. The restraint of the imperial court on him is only his loyalty to the imperial court. The stakes are still high.
After the Anshi Rebellion, with the withdrawal of the army, the Silk Road gradually declined, corresponding to the rise of shipping.
The Song Dynasty's defense against the military generals was simply prevented from going to the cracks in the bones. Obviously, no military general would be given such great authority, let alone for a declining Silk Road.
Second, the strange military system of the Song Dynasty
The weapons and equipment of the Song Dynasty can be regarded as the peak of the cold weapon era; but in contrast, the Song Dynasty's military system was constrained by layers and layers, and it was also diluted to the peak; resulting in the strength not being able to play out at all.
If we can get rid of the constraints, the military strength of the Song Dynasty is also quite considerable. Just like Song Zhezong stood in the perspective of the emperor, firmly used troops to the west, and almost destroyed the country in Western Xia.
But unfortunately, such an emperor did not live long, and most of the emperors of the Song Dynasty still insisted on the "heavy literature and suppressing martial arts".
Whenever an army marches and fights, it is necessary to engage a (or a group) of civilian officials to supervise the army to contain the military generals. Yang Laolinggong died under the blind command of the supervision army, which was really a sigh.
What is even more ridiculous is that the army of the Song Dynasty (including the forbidden army) did not have its own special logistics management system. The logistical support of the large army was completed by the transfer envoys of the imperial court and the local government. If the two departments that lack coordination ability can do a good job in support work, it will be strange.
The only advantage of this was that it was convenient for the imperial court, which could get stuck in the throat of disobedient generals at any time, and also pushed the army into the risk of starvation at any time.
Anyway, it's all mixed food, there's no need to find yourself uncomfortable. As for what kind of big army leaps forward and detours, we will not play it.
The Song army fought a good defensive war, and once it fought a foreign war, it began to thin out, all thanks to this strange system.
Third, the transfer of the strategic center
With the southward shift of economic centers and the rise of maritime transport, the economic lifeline is no longer indispensable to the western region. As a relatively "instigated" orthodox regime, this will naturally affect the formulation of national policies.
Western Xia was not invincible, as Emperor Zhezong had already proved. Once the Western XiaTong Western Region was conquered, it was faced with the risk of throwing a large amount of grain and wages to the Western Regions, and also risking betrayal by the military generals. Instead of that, it's better to take a defensive position.
As for the Liao state, it was really uncomfortable to fight, and both the Song and The Liao were very uncomfortable. The Song Dynasty was dominated by infantry, while the Liao State was dominated by cavalry.
The pattern of the Sixteen Prefectures of Yanyun was doomed, and once the Liao State took the initiative to attack, it had to use its own cavalry to attack the Song Dynasty's fortified city; on the contrary, if the Song Dynasty attacked, it would have to race on the grassland with human and horse legs. Whoever takes the initiative suffers! The only way to do it is to take a defensive position.
Since the west and north can only take a defensive position, the center of gravity of the Song Dynasty is biased to the southeast. The economic development of the south and the opening of shipping in Quanzhou brought a lot of income to the Song Dynasty. In this way, there is no motivation to develop into a bitter cold place.
It simply formed an inexplicable cycle: people were living together at the border, but their hearts had long since drifted to the bustling southeast. If you fight a war, you have to do it.
Write at the end:
The Song Dynasty, whose weapons and equipment are at their peak and whose quality of soldiers is also quite good, has become a well-known warrior in history, and it has been doomed from the song dynasty's idea of "emphasizing literature and suppressing martial arts" in the founding of the Song Dynasty.
The land of Huaxia is a place that does not lack miracles, and anything is possible as long as you want.
Do you want to fight? Dare to fight? How much do you dare to delegate? This is all a factor that determines combat effectiveness, but unfortunately, in this regard, the Song Dynasty did not do a very good job.
And all this determines the degree of reverence for you of the alien races around you. It is not surprising that hundreds of thousands of northwestern garrisons are inferior to the Tang Dynasty's 20,000 western garrisons.