I think that the Arabian & Saharan desert nomad cavalry were also among the most effective cavalry, though somewhat underrated. In contrast to the Central Asian steppe nomads who were usually light cavalry archers, the Arabian/Saharan desert nomads were usually light cavalry lancers (though they later became light cavalry archers in medieval times), thus they lacked the range of cavalry archers. However, the desert nomad cavalry made up for it with their greater mobility, due to being unarmoured or extremely lightly-armoured and also due to apparently having faster horses (the ancestors of the modern Arabian horse now used across the world).I know The French Foreign Legion is famous for fighting against such incredible odds that victory or defeat are practically after thoughts.The late 19th century abounds with such examples, typically speaking as long as a european army was in a decent defensive position with the ability to concentrate its fire and an abundance of ammunition it was all but impossible to overwhelm. On the other hand if the "native" army could catch the Europeans on the march, or isolate each section of the army one by one it would almost always sweep over them. British experiences in the Zulu war especially show plenty of examples of this.
A common pattern of colonial warfare was in fact to send out a well equiped armed column with lots of fire-power, machineguns for preference (the Brits really cottoned on to their Swedish Nordenfelt machineguns prior to the advent of the Maxim), and then wait for the natives to turn up. It usually worked.
As for entrenched positions, it's been claimed that what the British did at Roarke's Drift during the Zulu war was commonplace along the North West Frontier in India. It was politics that ensured it got such massive attention following upon Isandlwhana as it did.
It supposedly occurred in 1882 when 300 Legionaries escorting a surveying team near the Morocco/Algeria border met 8,000 Arab cavalry. After 7 hours of fighting in a blinding sandstorm the Arabs retreat, having suffered 2,000 casualties. Legionnaire losses where 42 killed and 31 wounded. Typically the commander survived despite 9 gunshot wounds and 7 sword cuts. Cool story, but is it true? I'm sure the wounds were various levels of superficial .The Italian troops in the italo turk war were outfought by superb Arab cavalry. The effectiveness of the Arabian/Saharan light cavalry lancers can be seen in the Punic Wars where Hannibal's Numidian Berber cavalry outflanked the Roman cavalry, and the Arab Muslim conquests where Khalid ibn al-Walid's Rashidun Arab cavalry outflanked both the Sassanid light cavalry archers and the Sassanid & Byzantine Cataphracts/Knights. Early organized Arab mounted forces under the Rashidun caliphate comprised a light cavalry armed with lance and sword. Its main role was to attack the enemy flanks and rear. These relatively lightly armored horsemen formed the most effective element of the Muslim armies during the later stages of the Islamic conquest of the Levant. The best use of this lightly armed fast moving cavalry was revealed at the Battle of Yarmouk (636 AD) in which Khalid ibn Walid, knowing the skills of his horsemen, used them to turn the tables at every critical instance of the battle with their ability to engage, disengage, then turn back and attack again from the flank or rear. A strong cavalry regiment was formed by Khalid ibn Walid which included the veterans of the campaign of Iraq and Syria. Early Muslim historians have given it the name Mutaharrik tulai'a( متحرك طليعة ), or the Mobile guard. This was used as an advance guard and a strong striking force to route the opposing armies with its greater mobility that give it an upper hand when maneuvering against any Byzantine army. With this mobile striking force, the conquest of Syria was made easy.
Later Mamluks were trained as cavalry soldiers. Mamluks were to follow the dictates of al-furusiyya, a code of conduct that included values like courage and generosity but also doctrine of cavalry tactics, horsemanship, archery and treatment of wounds.