Psalms 139 tells us that God knows absolutely everything about us! He knows our actions: When We sit down and when we get up (v. 2); when we go somewhere and when we lie down (v. 3). He is intimately acquainted with all our ways! He knows our words: in fact, He even knows what we are going to say before we even get a chance to say it (v. 4)! He even knows our thoughts from afar (v. 2b). Like a caged bird, He’s got us surrounded, with His hand upon us (v. 5). There is no escape from His thorough, penetrating knowledge. So David exclaims (v. 6): “Such knowledge is too wonderful for us; it is too high, we cannot attain to it.”
David is asking God to search him for any evil intent in his heart and if he find anything to take it out and to clean him, giving him a true and clean heart.