[
https://issues.apache.org/jira/browse/ODE-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Kearns updated ODE-149:
---------------------------
Description:
Startup currently deserializes deployment units, process configurations, and
process properties. The default queries for this in hibernate become very slow
when there are many of both due to an ill-advised outer join (eg with 10,000
deployment units and 30,000 processes the query would look at 300 million rows
when it only needs to look at 30,000 - a difference on the order of 15
minutes). Following is a workaround for hibernate. OpenJpa may need similar
fix.
bpel-store: org.apache.ode.store.hib.ConfStoreConnectionHib.java, replace
getDeploymentUnits with:
@SuppressWarnings("unchecked")
public Collection<DeploymentUnitDAO> getDeploymentUnits() {
List joined = _session.createSQLQuery("SELECT * FROM STORE_DU du, "
+ "STORE_PROCESS proc where du.NAME=proc.DU")
.addEntity("du",DeploymentUnitDaoImpl.class)
.addEntity("proc",ProcessConfDaoImpl.class )
.addJoin("processes","du.processes")
.list();
Set allDu = new HashSet();
for(Object o : joined) {
Object[] obj = (Object[])o;
allDu.add(obj[0]);
};
return allDu;
}
was:
Startup currently deserializes deployment units, process configurations, and
process properties. The default queries for this in hibernate become very slow
when there are many of both due to an ill-advised outer join (eg with 10,000
deployment units and 30,000 processes the query would look at 300 million rows
when it only needs to look at 30,000 - a difference on the order of 15
minutes). Following is a workaround for hibernate. OpenJpa may need similar
fix.
@SuppressWarnings("unchecked")
public Collection<DeploymentUnitDAO> getDeploymentUnits() {
List joined = _session.createSQLQuery("SELECT * FROM STORE_DU du, "
+ "STORE_PROCESS proc where du.NAME=proc.DU")
.addEntity("du",DeploymentUnitDaoImpl.class)
.addEntity("proc",ProcessConfDaoImpl.class )
.addJoin("processes","du.processes")
.list();
Set allDu = new HashSet();
for(Object o : joined) {
Object[] obj = (Object[])o;
allDu.add(obj[0]);
};
return allDu;
}
> Ode should startup faster when there are many DUs and Processes
> ---------------------------------------------------------------
>
> Key: ODE-149
> URL: https://issues.apache.org/jira/browse/ODE-149
> Project: Ode
> Issue Type: Improvement
> Components: BPEL Runtime
> Affects Versions: 1.0-incubating
> Reporter: Dan Kearns
>
> Startup currently deserializes deployment units, process configurations, and
> process properties. The default queries for this in hibernate become very
> slow when there are many of both due to an ill-advised outer join (eg with
> 10,000 deployment units and 30,000 processes the query would look at 300
> million rows when it only needs to look at 30,000 - a difference on the order
> of 15 minutes). Following is a workaround for hibernate. OpenJpa may need
> similar fix.
> bpel-store: org.apache.ode.store.hib.ConfStoreConnectionHib.java, replace
> getDeploymentUnits with:
> @SuppressWarnings("unchecked")
> public Collection<DeploymentUnitDAO> getDeploymentUnits() {
> List joined = _session.createSQLQuery("SELECT * FROM STORE_DU du, "
> + "STORE_PROCESS proc where
> du.NAME=proc.DU")
> .addEntity("du",DeploymentUnitDaoImpl.class)
> .addEntity("proc",ProcessConfDaoImpl.class )
> .addJoin("processes","du.processes")
> .list();
> Set allDu = new HashSet();
> for(Object o : joined) {
> Object[] obj = (Object[])o;
> allDu.add(obj[0]);
> };
> return allDu;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.