Urwah bin al-Zubayr (may Allah have mercy on him) narrates from Sayyiduna Mughirah bin Shu'bah (may Allah be pleased with him) that whenever the Prophet (peace and blessings be upon him) intended to relieve himself, he would go far away.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 18196