Notes on the Bible, by Albert Barnes, , at sacred-texts.com
Abominations - The mixed marriages had prevented that complete separation of the people of God from the idolatrous rites, or "abominations," which the Law required, and which was necessary for purity of religion. See Kg1 11:2 note.
Plucking out the hair with the hands, so common among the Classical nations, is, comparatively speaking, rarely mentioned as practiced by Asiatics.
Very similar in tone to this are the confessions of Nehemiah Neh 9:29-35 and of Daniel (see the marginal references). The captivity had done its work by deeply convincing of sin the Jewish nation that had previously been so proud and self-righteous.
The "little space" was above 60 years, counting from the second year of Darius Ezr 4:24, or about 80 years, counting from the first year of Cyrus Ezr 1:1. This does not seem to Ezra much in the "lifetime" of a nation.
A remnant to escape - Rather, "a remnant that has escaped." The "remnant" is the new community that has returned from the captivity.
A nail - Compare the marginal note and reference. The metaphor is probably drawn from a tent-pin, which is driven into the earth to make the tent firm and secure.
We were bondmen - Rather, "we are bondmen" (compare the marginal reference). The Israelites, though returned from the captivity, were still "bondmen." The Persian monarch was their absolute lord and master.
Saying - The words which follow in this verse are not quoted from any previous book of Scripture, but merely give the general sense of numerous passages. Compare the marginal references.
Deliverance - Or, "remnant," as in Ezr 9:8.
Some take "righteous" to mean here "kind" or "merciful." Others give it the more usual sense of "just," and understand the full meaning of the passage to be, "Thou art righteous, and hast punished us, because of our sin, the contraction of forbidden marriages, so that we are a mere remnant of what was once a great people."