The Roman church, following the LXX and the Vulgate, treat Psalms 9 and 10 as a single entity.  This affects the numbering of the Psalms right up until Psa 148.  In the Hebrew, however, they are separate.  Rather than being considered as two halves of the same psalm, they are probably best understood to be a complementary pair, considering their very different moods.

Psa 9:1 For the director of music. To the tune of “The Death of the Son.” A psalm of David. I will praise you, O LORD, with all my heart; I will tell of all your wonders.

I will praise you– Praise is the keynote of the worship of the true God.  Spurgeon says: ‘Moloch may be worshipped with shrieks of pain, and Juggernaut may be honoured by dying groans and inhuman yells, but he whose name is Love is best pleased with the holy mirth, and sanctified gladness of his people. Daily rejoicing is an ornament to the Christian character, and a suitable robe for God’s choristers to wear. God loveth a cheerful giver, whether it be the gold of his purse or the gold of his mouth which he presents upon his altar.’

With all my heart – How much of our praise is half-hearted?

I will tell of all your wonders – ‘When we have received any special good thing from the Lord, it is well, according as we have opportunities, to tell others of it. When the woman who had lost one of her ten pieces of silver, found the missing portion of her money, she gathered her neighbours and her friends together, saying, “Rejoice with me, for I have found the piece which I had lost.” We may do the same; we may tell friends and relations that we have received such and such a blessing, and that we trace it directly to the hand of God. Why have we not already done this? Is there a lurking unbelief as to whether it really came from God; or are we ashamed to own it before those who are perhaps accustomed to laugh at such things? Who knows so much of the marvellous works of God as his own people; if they be silent, how can we expect the world to see what he has done? Let us not be ashamed to glorify God, by telling what we know and feel he has done; let us watch our opportunity to bring out distinctly the fact of his acting; let us feel delighted at having an opportunity, from our own experience, of telling what must turn to his praise; and them that honour God, God will honour in turn; if we be willing to talk of his deeds, he will give us enough to talk about. P. B. Power, in “I Wills” of the Psalms.’ (Q by Spurgeon)

God’s wonders of creation, providence, and redemption are all worthy of both praise and proclamation.

Psa 9:2 I will be glad and rejoice in you; I will sing praise to your name, O Most High.

Psa 9:3 My enemies turn back; they stumble and perish before you.

Psa 9:4 For you have upheld my right and my cause; you have sat on your throne, judging righteously.

Psa 9:5 You have rebuked the nations and destroyed the wicked; you have blotted out their name for ever and ever.

According to Kidner, the tenses in v5f and ‘prophetic perfects’, commonly used in the OT to describe coming events as if they had already happened, so certain is their fulfilment.

Psa 9:6 Endless ruin has overtaken the enemy, you have uprooted their cities; even the memory of them has perished.

Psa 9:7 The LORD reigns forever; he has established his throne for judgment.

We may see in v7f, and in 1 Chron 16:31; Psalm 97:1, the idea of ‘the kingdom of God’ in its OT aspect and anticipation.

Psa 9:8 He will judge the world in righteousness; he will govern the peoples with justice.

He will judge the world in righteousness – This in contrast to

Psa 9:9 The LORD is a refuge for the oppressed, a stronghold in times of trouble.

The Lord is a refuge for the oppressed– ‘He who gives no quarter to the wicked in the day of judgment, is the defence and refuge of his saints in the day of trouble.’ (Spurgeon)

Psa 9:10 Those who know your name will trust in you, for you, LORD, have never forsaken those who seek you.

‘Ignorance is worst when it amounts to ignorance of God, and knowledge is best when it exercises itself upon the name of God. This most excellent knowledge leads to the most excellent grace of faith. O, to learn more of the attributes and character of God. Unbelief, that hooting nightbird, cannot live in the light of divine knowledge, it flies before the sun of God’s great and gracious name. If we read this verse literally, there is, no doubt, a glorious fulness of assurance in the names of God…By knowing his name is also meant an experimental acquaintance with the attributes of God, which are every one of them anchors to hold the soul from drifting in seasons of peril. The Lord may hide his face for a season from his people, but he never has utterly, finally, really, or angrily forsaken them that seek him. Let the poor seekers draw comfort from this fact, and let the finders rejoice yet more exceedingly, for what must be the Lord’s faithfulness to those who find if he is so gracious to those who seek.’ (Spurgeon)

Psa 9:11 Sing praises to the LORD, enthroned in Zion; proclaim among the nations what he has done.

‘Being full of gratitude himself, our inspired author is eager to excite others to join the strain, and praise God in the same manner as he himself vowed to do in the first and second verses. The heavenly spirit of praise is gloriously contagious, and he that hath it is never content unless he can excite all who surround him to unite in his sweet employ. Singing and preaching, as means of glorifying God, are here joined together, and it is remarkable that, connected with all revivals of gospel ministry, there has been a sudden outburst of the spirit of song. Luther’s Psalms and Hymns were in all men’s mouths, and in the modern revival under Wesley and Whitefield, the strains of Charles Wesley, Cennick, Berridge, Toplady, Hart, Newton, and many others, were the outgrowth of restored piety.’ (Spurgeon)

Psa 9:12 For he who avenges blood remembers; he does not ignore the cry of the afflicted.

He who avenges blood – ‘It is possible that the title “avenger of blood” evolved out of the family obligation to engage in blood revenge when one of their clan members was slain. Such a process, while typical of tribal society, is extremely disruptive to the maintenance of order within an organized state. As a result the “avenger of blood” may have been appointed by the government to serve both the needs of the family and the state by apprehending the accused and then carrying out sentence if the verdict was murder.’ (IVP Background Commentary)

Psa 9:13 O LORD, see how my enemies persecute me! Have mercy and lift me up from the gates of death,

The gates of death – The netherworld, Sheol, was believed to be like an earthly city in that it contained houses and even a city wall (primarily to keep in its inhabitants).’ (IVP Background Commentary)

Psa 9:14 that I may declare your praises in the gates of the Daughter of Zion and there rejoice in your salvation.

Psa 9:15 The nations have fallen into the pit they have dug; their feet are caught in the net they have hidden.

Psa 9:16 The LORD is known by his justice; the wicked are ensnared by the work of their hands. Higgaion. Selah

Psa 9:17 The wicked return to the grave, all the nations that forget God.

The wicked return to the grave – a ‘revealing nuance’, according to Kidner, indicating that ‘death is their native element.’

Psa 9:18 But the needy will not always be forgotten, nor the hope of the afflicted ever perish.

Psa 9:19 Arise, O LORD, let not man triumph; let the nations be judged in your presence.

Psa 9:20 Strike them with terror, O LORD; let the nations know they are but men. Selah