I think that god's omniscience is limited to actuality and not possibilities.
The reason I think this is any thought god thinks is manifested. If god thinks it; it is.
Consequently God only knows a thing because it was; all things then are subject to fate.
The only possibilities that can be considered by god are the speculations of men. If you think of a possible future god knows that for he is intimately acquainted with your thoughts.
I believe then that prayer is necessary. You must set aside time in your life time to speculate and to think about possibilities for only in the thinking of them can god know. God only knows what has been or will come to pass; god does not know the things that never were nor will be.
Alternatively if god's omniscience extends to all possibilities than all possibilities must be actualities in alternate universes that are all created and known within the mind of God simultaneously.
There is something macabre about this in that the vast majority of possible universes or timelines are really bad ones. There's infinitely more ways for things to fail horribly than there are ways for them to thrive.
I have two solutions for this. One solution is that the spirit or "awareness, a self that experiences" is not planted into everything thus not every life in this timeline or every other timeline if there are multiple universes is actually lived/experienced thus it is not suffered. I've seen stories like The Egg suggest that there is only one soul and we must live the lives of everyone that has ever lived on Earth and will live on Earth; the moral of that story ends up being treat everyone kindly as if they were yourself but even if you were to do that still the suffering would far outweigh the good. If you extend selfhood also to animals the problem is even worse; the vast majority of your time as an incarnate spirit would be suffering the horrible dullness and pains of all the various lower lifeforms and once in a very rare while ever getting to experience a human life. I tend to think of spirit however as something free from both mind and body; and one is not condemned to an eternity of having to wear every mind and body but is quite free of such bondage. The second solution is that there is only one universe and not every possible universe being manifested all at the same time.
The writings about elementals and other beings that lack the divine principle in them that is in man (or at least, some men) and which seek to be connected back to god by coming into possession of a man suggest to me that the incarnate spirit is not in all things. This allows for many universes which none the less are not suffered or even just this one universe but a lot of suffering indeed is avoided.
In conclusion for god to think a thing it must be, and for man to think a thing it must be considered by God, but god neither knows those things that are not thought up by men nor thought up by him, Man's thoughts as such play a critical role in informing God how the creation shall unfold and we must be sure to play our role in informing God through our thoughts by having had them. Our relationship to god through our thoughts is critical to god expressing his omniscience to the highest degree. All things are known through god and through the roles of his creatures.
To consider a possibility a creature such as man must think a thing and for a thing to be actual god must think that thing.