Imagine a being with infinite processing power and infinite data storage space. This means, this being can know instanteously about all possible consequences of everything that could happen, and can know the right answer to every problem (as far as it is “knowable” at all, that is, calculable).
While thinking and decision finding is hard work and takes a long time for us, because of limited brain power, not so with this being. This being would know an answer instanteously and without any effort.
It is probably a good idea to always keep in mind that God is more like this being, and definitely not like a human who toils in thinking.