Here, 1. David makes a thankful acknowledgment of God’s gracious dealings with him all along: Thou hast dealt well with thy servant. However God has dealt with us, we must own he has dealt well with us, better than we deserve, and all in love and with design to work for our good. In many instances God has done well for us beyond our expectations. He has done well for all his servants; never any of them complained that he had used them hardly. Thou hast dealt well with me, not only according to thy mercy, but according to thy word. God’s favours look best when they are compared with the promise and are seen flowing from that fountain. 2. Upon these experiences he grounds a petition for divine instruction: “Teach me good judgment and knowledge, that, by thy grace, I may render again, in some measure, according to the benefit done unto me.” Teach me a good taste (so the word signifies), a good relish, to discern things that differ, to distinguish between truth and falsehood, good and evil; for the ear tries words, as the mouth tastes meat. We should pray to God for a sound mind, that we may have spiritual senses exercised, Heb. 5:14. Many have knowledge who have little judgment; those who have both are well fortified against the snares of Satan and well furnished for the service of God and their generation. 3. This petition is backed with a plea: “For I have believed thy commandments, received them, and consented to them that they are good, and submitted to their government; therefore, Lord, teach me.” Where God has given a good heart a good head too many in faith be prayed for.