Hi Jan, This is a "known issue" although I cannot seem to find the issue, so I created a new one: https://github.com/jOOQ/jOOQ/issues/5962
DSLContext.batchStore() et al need to run through all records and simulate individual Record.store() calls to collect the individual SQL strings (and bind values) for later batching. This is to preserve the store() semantics, which has grown rather complex over the years. We should mention this in the Javadoc, that batching helps with a few stores, but with a large amount of inserts, you should probably revert to the Loader API: https://www.jooq.org/doc/latest/manual/sql-execution/importing Hope this helps, Lukas 2017-03-11 1:44 GMT+01:00 Jan Lessner <[email protected]>: > Hello everybody > I did some performance checks for batch operations. I am using the > batchInsert() method to insert a large amount of records which took > considerably more time than other persistence managers took. So I stepped > into the code and found something in BatchCRUD::executePrepared which looks > kind of suspicious to me: allthough I passed solely new records of the same > type (resulting in identically structured insert statements), every record > runs into the QueryCollectorSignal exception. Looks like an unexpected > behaviour which in turn may slow down the execution time of the batch > operation. > > Maybe some expert finds the time to have a look if there is actually a > defect present - or if I just outed myself as a silly rookie ;-) > > Regards, > Jan > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
