God is omniscient. He knows everything: everything possible, everything actual; all events and all creatures, of the past, the present, and the future. He is perfectly acquainted with every detail in the life of every being in heaven, in earth, and in hell. “He knoweth what is in the darkness” (Dan 2:22). Nothing escapes His notice, nothing can be hidden from Him, nothing is forgotten by Him. Well may we say with the Psalmist, “Such knowledge is too wonderful for me; it is high, I cannot attain unto it” (Psa 139:6). His knowledge is perfect. He never errs, never changes, never overlooks anything. “Neither is there any creature that is not manifest in His sight: but all things are naked and opened unto the eyes of Him with whom we have to do” (Heb 4:13). Yes, such is the God “with whom we have to do”!
To the believer, the fact of God’s omniscience is a truth fraught with much comfort. In times of perplexity he says with Job, “But He knoweth the way that I take” (23:10). It may be profoundly mysterious to me, quite incomprehensible to my friends, but “He knoweth”! In times of weariness and weakness believers assure themselves, “He knoweth our frame; He remembereth that we are dust” (Psa 103:14). In times of doubt and suspicion they appeal to this very attribute, saying, “Search me, O God, and know my heart: try me, and know my thoughts: and see if there be any wicked way in me, and lead me in the way everlasting” (Psa 139:23,24). In time of sad failure, when our actions have belied our hearts, when our deeds have repudiated our devotion, and the searching question comes to us, “Lovest thou Me?”, we say, as Peter did, “Lord, Thou knowest all things; Thou knowest that I love Thee” (John 21:17).
Here is encouragement to prayer. There is no cause for fearing that the petitions of the righteous will not be heard, or that their sighs and tears shall escape the notice of God, since He knows the thoughts and intents of the heart. There is no danger of the individual saint being overlooked amidst the multitude of supplicants who daily and hourly present their various petitions, for an infinite Mind is as capable of paying the same attention to millions as if only one individual were seeking its attention. So too the lack of appropriate language, the inability to give expression to the deepest longing of the soul, will not jeopardize our prayers, for “It shall come to pass, that before they call, I will answer; and while they are yet speaking, I will hear” (Isa 65:24).
Adapted from Arthur W. Pink, The Attributes of God (Kindle Edition)