The Buddha does not contain ALL knowledge as if it were lying dormant in his mind at any given moment (therefore he is not “omniscient” in this sense) but he does say that an enlightened being can direct the mind in any direction he or she wishes (like a net enveloping and collecting all things) throughout the world, and in so doing bring any part of it into his enlightened conscious awareness. This lasts for as long as concentration is held in that direction and then fails away – remember that the true nature of the mind is “empty” and spacious – so that all phenomena seems to arise and pass away within it. In fact the Buddha states a long list of abilities and powers he possesses – including the ability for his mind’s awareness to travel to other worlds. What happened over-time is that through various commentaries and translations, the fact that the Buddha could move his mind’s awareness in any direction (or none) became conflated with the idea that his mind’s awareness was already in every place and at every time.