This Psalm is one of breathtaking scope and grandeur, yet it is no mere theological treatise for throughout it is intensely personal. Motyer writes
Certainly this psalm teaches the Lord’s omniscience (vv.1-6), omnipresence (vv.7-12), creatorship (vv.13-18) and holiness (vv.19-24) but such abstractions are far from its heart. For to the psalmist omniscience is God’s complete knowledge of me; omnipresence, God with me in every place; creatorship, God’s sovereign ownership of every part of me; and holiness, God’s will that I be like him.
There is a very clear structure: four sections of 6 verses, with each section also subdividing into four verses then two.
David doesn’t begin by telling what he knows of God, but what God knows of him. God’s knowledge of us is total: all we do, all we think, all we say – even before we say it. And it is not merely comprehensive, it is active, discriminating, personal, relational. It is a knowledge that is both wonderful and mind-boggling (v.6), and possibly uncomfortable and oppressive (v.5).
We might long to escape from his searching eye, but not only is such escape futile, his presence is shown actually to be gracious (v.10). It’s not a merely passive presence, he keeps and guides us.
Verses 8,9 are all-encompassing – from the highest heights, to the lowest depths, from the farthest east (“the wings of the dawn”), to the farthest west (“the far side of the sea”). If we try to run from him, it is not that he will chase after us, he is already there.
And though we might hide from others, even the deepest darkness cannot hide us from his sight (vv.11,12).
What explains his complete knowledge and inescapable care of us is the truth that he created us, and sustains us. This understanding should lead each of us to praise him (v.14), as well as having important implications for how we value embryos.
“All the days ordained for me” – his sovereign hand on our lives extends from even before birth (from conception) to death, and even beyond death – “when I awake” (v.18) perhaps speaks of the day of resurrection.
The “thoughts” of v.17 are particularly the thoughts God has about us; these are “precious” because of all they speak of God’s commitment to us, and vast and innumerable because of their all-encompassing detail.
These verses might seem to jar with what has gone before, but it is the very vision of God that of vv.1-18, which calls forth this hatred of all who would oppose and dishonour God. This is the proper response to the truths he has been contemplating – a zeal for God’s glory in the world. So God’s adversaries are now counted “my enemies”. There is a proper indignation we should feel whenever God’s name is dishonoured.
But he is not concerned only for the evil around him; he is as concerned for the evil remaining in his own heart. So the prayer closes by calling on God not to leave him as he is, but to search his heart for all that is offensive, and to “lead him in the way everlasting”. Knowing God as he truly is should be transformative, it should change us. Knowing him as he is should lead us to honour him as we ought.