This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
One way is to increase the heap memory. But trying to batch 200000 queries at one go, looks too much. Probably you should consider splitting up into smaller sizes. For example, the following code snippet will batch upto 100 queries at a time.