O LORD, thou hast searched me, and known me…. Thou compassest my path and my lying down, and art acquainted with all my ways.
—Psalm 139:1, 3
In the same way, God, in one effortless act, knows instantly (not a little at a time, but instantly and perfectly) all things that can be known. That’s why I say that God cannot learn. As I said before, if we realized that God couldn’t learn, we could shorten our prayers quite a bit and step up their power. There is no reason to tell God things that He knew before you were born!
God knows the end from the beginning and He knew it long before it happened. Long before your parents met, God knew what you would be doing at this very moment. Before your grandparents met, before England was a nation, or the Roman Empire dissolved, or the Roman Empire was formed, God knew all about us. He knew everything about us—every hair on our head, our weight, our name, our past. And He knew it before we were born.
He knew it before Adam was. And when Adam walked in the garden with God, God knew all about Adam, all about Eve, all about their sons, all about the human race. God never gets astonished, astounded or surprised, because He already knows. You can walk down the street, turn the corner and get the surprise of your life. But God never turned the corner and got surprised, for the simple reason that God was already around that corner before He turned it. God already knew before He found out! God knows all things. AOGII113-114
Lord, I’m thankful that with You there are no surprises, nothing You don’t know ahead of time. Thank You. Amen. 
139:1, 2 First, he begins with the omniscience of God. God knows everything.
There is nothing He does not know.
Though limitless the universe and gloriously grand,
He knows the eternal story of every grain of sand.
But here it is His knowledge of the individual life that is particularly in view. In 1988 it was estimated that there were 5,000,000,000 people in the world. Yet God is intimately acquainted with each one. He knows all about every one of us.
He has searched us and known us! Words and deeds, thoughts and motives, He knows us inside out. He knows when we sit down to relax and when we rise up to engage in the varied activities of life. He can tell what we are thinking, and even anticipates our thoughts.
139:3 He sees us when we walk and when we lie down; in other words, He keeps a constant watch on us. None of our ways is hidden from Him.
139:1 searched me and known me. Cf. the appeal in vv. 23, 24. He is the all-knowing God who has an intimate understanding of the psalmist, as of all His creation.
139:2 you discern my thoughts. God is omniscient. Thoughts may be the most private areas of life, but they cannot be hidden from the Lord (1 Chr. 28:9; Jer. 17:10; John 2:25).
139:3 You search out my path … lying down. Lit. “You have measured my traveling and my stretching out [to rest].” This is a merism for the thoroughness of God’s knowledge. See note on 49:2.
139:1 This psalm contains the clearest expression of the attributes and character of God to be found in the Psalter. One could hardly describe the omniscience and omnipresence of God more effectively. As David meditated upon God’s omniscience, which includes actions (vv. 2, 3), words (v. 4), and thoughts (v. 2), it was apparently more than he could comprehend (cf.Rom. 11:33).
The omniscience of the Lord (139:1–6)
139:1. The theme of verses 1–6 is announced in the opening verse: the Lord knew David penetratingly. David said God’s knowledge came as if He had scoured every detail of David’s life and thus knew him intimately.
139:2–4. Samples of how well God knew David are stated here. The Lord (You is emphatic in Heb.; cf. v. 13) knew every move he made; the two opposites of sitting and rising represent all his actions (this is a figure of speech known as a merism; cf. vv. 3, 8). God knew not only David’s actions; He also knew his motivations (thoughts; cf. v. 17). Afar evidently refers not to space but to time.
The daily activities of the psalmist were also thoroughly familiar to the Lord. The opposites of going out in the morning and lying down at night represent the whole day’s activities (another merism; cf. vv. 2, 8).
But the one sample that epitomizes God’s omniscience is in verse 4. Before the psalmist could frame a word on his tongue, the Lord was thoroughly familiar with what he was about to say. (The Heb. for “word” is millâh and the similar-sounding word for completely is kūllāḥ)
139:5–6. David’s initial response to this staggering knowledge was that he was troubled. Like many who respond to the fact of God’s omniscience, he thought it was confining, that God had besieged him and cupped His hand over him.
Moreover, this kind of knowledge was out of David’s control—it was too wonderful for him. The word “wonderful” is in the emphatic position, at the beginning of the sentence. On the meaning of “wonderful” as “extraordinary or surpassing,” see comments on 9:1. In other words divine omniscience is too high for humans to comprehend (also cf. comments on 139:14).
 Tozer, A. W., & Eggert, R. (2015). Tozer on the almighty god: a 365-day devotional. Chicago, IL: Moody Publishers.
 MacDonald, W. (1995). Believer’s Bible Commentary: Old and New Testaments. (A. Farstad, Ed.) (p. 769). Nashville: Thomas Nelson.
 Sproul, R. C. (Ed.). (2015). The Reformation Study Bible: English Standard Version (2015 Edition) (p. 994). Orlando, FL: Reformation Trust.
 Criswell, W. A., Patterson, P., Clendenen, E. R., Akin, D. L., Chamberlin, M., Patterson, D. K., & Pogue, J. (Eds.). (1991). Believer’s Study Bible (electronic ed., Ps 139:1). Nashville: Thomas Nelson.
 Ross, A. P. (1985). Psalms. In J. F. Walvoord & R. B. Zuck (Eds.), The Bible Knowledge Commentary: An Exposition of the Scriptures (Vol. 1, p. 891). Wheaton, IL: Victor Books.