t appears that this Psalm is divided into 2 distinct sections. Verses 1-5 may be the first half of a battle song. These words would fit well if they were sung by a king's loyal subjects as he goes out to do battle. Certainly, a king going forth to war needs God to defend him, to help him, to accept his sacrifices, to give him his desires, to cause his strategies to succeed and to answer his prayers. Be that king David or any other sovereign.
Verses 6-9 then could be the second half of the same battle song. These words might be properly sung at the conclusion of a successful day of doing battle: in celebration of triumph, in anticipation of more fighting and in worship of the God who brings success. Psalm 20:7 is particularly powerful. There are some people who have faith... but it is misplaced. Faith (trust) in chariots and horses is foolishness... regardless of how many you have or how mighty they may be. Faith in God however is sure to be rewarded.