Re: Batch inserts changed to row by row
Date: Sat, 14 Sep 2024 01:46:01 +0530
Message-ID: <CAEjw_fherAY34LVSZnctT_0AuA+_M2oLLz+qHtmQJmiLvM92wQ_at_mail.gmail.com>
Thank you so much for the response. I will verify the code , to understand how the batching is being currently handled in Java.
On Fri, Sep 13, 2024 at 4:35 PM Mikhail Velikikh <mvelikikh_at_gmail.com> wrote:
> Oracle Update Batching is a noop since 12.2 (ojdbc8). Without seeing the
> code, that is likely what you are hitting:
>
> https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/release-changes.html#GUID-9FF337B3-CC0D-40FF-A5C5-EFB998D0BC16
>
>> Oracle Update Batching
>
> Oracle update batching was deprecated in Oracle Database 12c Release 1
> (12.1). Since Oracle Database 12c Release 2 (12.2), Oracle update
> batching is a no operation code (no-op). This means that if you implement
> Oracle update batching in your application, using the Oracle Database 19c
> JDBC driver, then the specified batch size is not set and results in a
> batch size of 1. With this batch setting, your application processes one
> row at a time. Oracle strongly recommends that you use the standard JDBC
> batching if you are using the Oracle Database 19c JDBC driver.
>
>
> On Fri, 13 Sept 2024 at 04:01, Pap <oracle.developer35_at_gmail.com> wrote:
>
>> Hello,
>> While trying to upgrade the drivers from Ojdbc6 to ojdbc8, we encountered
>> an issue in which the batch inserts code which were happening by our Java
>> application initially are now being converted to all row by row. The Java
>> code has not been changed though, but it's just the driver upgrade which is
>> happening. And reaching out to the dev team , they mentioned that the batch
>> size has been mentioned in a properties file in Java and there have been no
>> code changes done, it's just the driver upgrade.
>>
>> So wanted to check , if anybody encountered such issues while upgrading
>> drivers? We are verifying the batch size from the v$sql by dividing
>> "rows_processed/executions" statistics for that query and its coming as ~1
>> in the ojdbc-8 driver and thus the inserts are happening very slow ojdbc8.
>> Wondering how we can get to the root cause here?
>>
>> Regards
>> Pap
>>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Sep 13 2024 - 22:16:01 CEST