On 8/15/06, DavidR <[EMAIL PROTECTED]> wrote:

I thought i saw around the forums that Ibatis automatically deals with this
behind the scenes?
Anyway, I cut down my test case to 1000 rows.



Well, imo ibatis automatically deals with this in the sense that it will batch everything between your startBatch executeBatch calls. So when inserting thousands of rows you'd better issue executeBatch and commits periodically. Usually the optimal number of rows to be batched is detrmined experimentally ( e.g. if I remember it right Oracle recommends some 20-30, though in my app 1000 performed better). Anyway, I think you should try profiling your app first to make sure that it's indeed database operation that slows things down. If it turns out that it's batch inserts that are performing poorly than I'd try maybe using some other JDBC driver ( i.e. blame the driver)...

Reply via email to