On Thursday, October 24, 2013 4:46:43 PM UTC, Lukas Eder wrote:
>
> Hi Matt,
>
> 2013/10/24 Matt Beaty <[email protected] <javascript:>>
>
>> I used the Eclipse debugger and I saw that each and every record I had in 
>> the ArrayList I sent into BatchInsert was individually executed. I thought 
>> I was doing everything equally,
>>
>
> I don't want to rule out a subtle bug. If you find something, feel free to 
> post it to this group!
>

   I am a fairly new user, so I wanted to see if anyone ran into the same 
issues. I will surely investigate more and provide feedback on what I find. 

>  
>
>>  but I will take a look at creating actual batches. I can call .bind() in 
>> a loop correct?
>>
>
> Yes. This recent thread shows an example:
> https://groups.google.com/d/msg/jooq-user/ZgmYp5pBrvQ/fleOtNsk1NwJ
>

   Thanks!
 

>
> Cheers
> Lukas
>  
>
>>
>> Thank you for the help, Lukas!
>>
>> Matt
>>
>>
>> On Thursday, October 24, 2013 8:23:27 AM UTC, Lukas Eder wrote:
>>
>>> I'm surprised that this wouldn't be fast. jOOQ calls through to JDBC to 
>>> execute batch statements. The only problem that I can see is that the 
>>> insert statements thus generated are not uniform, i.e. you didn't equally 
>>> set all values in all records. If that's the case, you might end up with as 
>>> many as 1000 distinct INSERT statements.
>>>
>>> To find out what kinds of statements are generated, you can turn on 
>>> logging on DEBUG level:
>>> http://www.jooq.org/doc/3.2/**manual/sql-execution/logging/<http://www.jooq.org/doc/3.2/manual/sql-execution/logging/>
>>>
>>> To keep control over rendered SQL, you might be better off creating an 
>>> actual batch statement. Examples here:
>>> http://www.jooq.org/doc/3.2/**manual/sql-execution/batch-**execution/<http://www.jooq.org/doc/3.2/manual/sql-execution/batch-execution/>
>>>
>>> Hope this helps,
>>> Lukas
>>>
>>>
>>> 2013/10/24 <[email protected]>
>>>
>>>> What is the JOOQ way to insert, let's say 1000 records?
>>>> I used batchInsert with an ArrayList, and it took way too long. Any 
>>>> help?
>>>>  
>>>> -- 
>>>> 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 jooq-user+...@**googlegroups.com.
>>>>
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>
>>>  -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.

Reply via email to