VO Performance Increase:
1. Mark VOs as insert only. This will avoid
unnecessary select queries from being issued.
2. 2.
Set VO in forward only mode which will prevent caching of previous sets of
rows.
3. 3.
Enable EO batch processing which reduces no of trips to database.
4. 4.
Commit records at regular intervals.
5.
Set setListenToEntityEvents to false.
Through JAVA : The Same thing can be set using Java (Programatically)
VO Impl change
---------------------------------------------------------------voi.setListenToEntityEvents(false);
voi.setMaxFetchSize(0);
voi.setAccessMode(RowSet.FORWARD_ONLY);
if(voi.getViewDef() != null){
voi.getViewDef().setFetchMode(voi.FETCH_AS_NEEDED);
voi.getViewDef().setInheritPersonalizationStrValue("merge");
}
EO Impl change
----------------------------------------------------------------if(voi != null && voi.getViewDef() != null){
EntityReference[] er = voi.getViewDef().getEntityUsages();
if(er != null){
for(EntityReference e:er){
EntityDefImpl eoDefImpl = e.getEntityDef();
if(eoDefImpl != null)
eoDefImpl.setBatchThreshold(10);
}
}
}
NOTE: If Entity has BLOB/CLOB attributes then eoDefImpl.setBatchThreshold(10); will not work.
It starts giving different error like : RowAllreadyDeleteException .....etc.
MoreInfo: http://waslleysouza.com.br/en/2014/08/enabling-update-batching-in-adf/
No comments:
Post a Comment