openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: Why would Kodo refuse to batch inserts in certain tables? Big performance drop migrating to Kodo 4.1
Date Tue, 17 Oct 2006 23:54:19 GMT
Alex-

If it works for you, then using your own custom OracleAdvancedSQL  
should do the trick.

The main reason we disabled is was due to one of the bugs you  
mentioned before: some driver/database versions would return an  
incorrect batch update count when people insert interleaved null/non- 
null Date fields, which led to optimisitic violations. Since there is  
little specificity from Oracle about the exact combinations that this  
affects, we opted to disable batching for Dates altogether, similar  
to how we disable it for Blob/Clob columns.



On Oct 17, 2006, at 4:27 PM, Roytman, Alex wrote:

> Marc,
>
> In Kodo 3.4 OracleDictionary:
>
> public boolean canBatch(Column col)
>     {
>         switch(col.getType())
>         {
>         case 2004:
>         case 2005:
>             return false;
>         }
>         return true;
>     }
>
>
> In Kodo 4.1 OracleAdvancedSQL:
>
>     public boolean canBatch(Column col)
>     {
>         switch(col.getType())
>         {
>         case 2004:
>         case 2005:
>             return false;
>
>         case 91:
>             return false;
>         }
>         return true;
>     }
>
>
> So obviously this behavior change has been introduced in Kodo 4.x and
> was not in 3.x branch. We have been using batching with dates using  
> Kodo
> 3.4 with up to date drivers for quite a while.
>
> I defined custom OracleAdvancedSQL implementation re-enabling DATE
> batching. I did not see any immediate problems running with latest
> drivers against latest oracle 10g.
>
> I will be glad to test it for you with latest 10.2.x and 9.2.x drivers
> if you can tell me what kind of problems you were experiencing with  
> date
> batching
>
> Alex
>
>
>
> -----Original Message-----
> From: Marc Prud'hommeaux [mailto:mprudhomapache@gmail.com] On  
> Behalf Of
> Marc Prud'hommeaux
> Sent: Tuesday, October 17, 2006 4:57 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Why would Kodo refuse to batch inserts in certain tables?
> Big performance drop migrating to Kodo 4.1
>
> Alex-
>
> Since the non-batched statement contains a Date field, this is due to
> the workaround for the Oracle JDBC driver bug I mentioned before.
>
> Kodo will not batch statements that contains a Date field when
> interacting with Oracle.
>
>


Mime
View raw message