This chapter is a hymn of thanksgiving paralleled by Psalm 118 with some differences, for which Abarbanel accounts by stating that David wrote the Psalm and the author of Samuel relied on an oral version. One of the differences between the versions is found in the benshing. Various explanations have been given for using the two versions. Abudarham, 14th century, considers migdol is like Shabbat a great king, a messianic reference, whereas magdil is a small king, referring to this world. Also the Samuel version was written when he was king, the Psalm version before he was king.
Commentators differ as to the meaning of the last words.
Some maintain they are messianic and refer to the future, others consider them David's last words after having completed the Psalms or they come from some 'final account' of David's reign. There is debate whether the words are prophetic, though David is not called a prophet or whether they are simply divinely inspired.