(16) Of the sea.--Psalms 18, "of waters." There are several such slight differences between 2 Samuel 22:15-16, and the parallel verses in the psalm, which mark the two as distinctly different recensions. The most striking change is that of the last pronoun from "his" to "thy in the psalm, as appropriate to its use in public worship.
22:1-51 David's psalm of thanksgiving. - This chapter is a psalm of praise; we find it afterwards nearly as Ps 18. They that trust God in the way of duty, shall find him a present help in their greatest dangers: David did so. Remarkable preservations should be particularly mentioned in our praises. We shall never be delivered from all enemies till we get to heaven. God will preserve all his people, 2Ti 4:18. Those who receive signal mercies from God, ought to give him the glory. In the day that God delivered David, he sang this song. While the mercy is fresh, and we are most affected with it, let the thank-offering be brought, to be kindled with the fire of that affection. All his joys and hopes close, as all our hopes should do, in the great Redeemer.
And the channels of the sea appeared, the foundations of the world were discovered, at the rebuking of the Lord, at the blast of the breath of his nostrils. See Gill on Psalm 18:15.