There have been numerous (to say the least) posts on that very subject. Use keyword Calvinist or Arminian and you may find them.
My take is that when God delegates responsiblity by conferring free will (don't dare suggest that to a Calvinist), then God deliberatly doesn't peek ahead at the outcome. It just stands to reason. How else do you explain the NUMEROUS instances of God being disappointed with people throughtout the Bible. You can't be disappointed if you really expected the outcome.
In summary, God can know all but doesn't always choose to know all.
-----------------------------------------------------
God is omniscient or He isn't.