Suggestion regarding running preparedstatement and batchupdate

I have to insert many rows in database therefore i use preparedstatement and for loop.I want to know if i add all the query in batch and then execute will it give better performance .Will sql statement is still in compiled form when execute in batch .Let if i add another sql statement which is different from previous sql statement in batch what the effect it has on performance.

Thanks

[400 byte] By [d17maya] at [2007-11-26 19:07:09]
# 1
hi., check this out.. http://forum.java.sun.com/thread.jspa?threadID=154870&start=15&tstart=0
shivakumar.ta at 2007-7-9 20:59:13 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...