JPA INSERT caused Oracle Version_Count increase High [message #1842424] |
Fri, 18 June 2021 09:07  |
WingHong Wong Messages: 1 Registered: June 2021 |
Junior Member |
|
|
We have a system using eclipselink as JPA connect to Oracle DB, and having a table with 176 fields, under this table have 87 VARCHAR2 fields. After some time the process of insert data become slow.
After investigate, in Oracle it show there are more than 100 (or few hundreds) of "VERSION_COUNT" for the INSERT statement into this table, which means the same INSERT statement into this 176 fields table have generated more than 100 of patterns in Oracle, we further investigate found that the INSERT statement created by eclipselink is something like below:
INSERT INTO TableName (Field1, Field2, Field3, .... Field175, Field176)
VALUES (?, ?, ?, .....?, ?)
And the variable that created to be set into above SQL (?) are always different, never follow the entity field length, such:
First time create insert statement for Field1 maybe declare @Field1 VARCHAR2(32) (but in entity set as length=50);
Second time create insert statement for Field1 maybe declare @Field1 VARCHAR2(128)
Third time maybe another length or maybe back to the same length as the first time (randomly)
Can I know whether we can fixed the datatype (or the length) of the field variables? Or is there any solution can resolve this problem?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02476 seconds