Author: nfilotto
Date: 2010-02-25 15:36:58 -0500 (Thu, 25 Feb 2010)
New Revision: 1954
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
Log:
EXOJCR-519: I reverted the changes on the order by clause since it doesn't seem to
have any performances effects.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2010-02-25
19:28:16 UTC (rev 1953)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2010-02-25
20:36:58 UTC (rev 1954)
@@ -206,7 +206,7 @@
"select I.*, P.NAME AS PROP_NAME, V.ORDER_NUM, V.DATA"
+ " from JCR_MITEM I, JCR_MITEM P, JCR_MVALUE V"
+ " where I.PARENT_ID=? and I.I_CLASS=1 and (P.PARENT_ID=I.ID and
P.I_CLASS=2 and (
P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' or
P.NAME='[http://www.jcp.org/jcr/1.0]mixinTypes' or
P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner' or
P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions') and
V.PROPERTY_ID=P.ID)"
- + " order by I.N_ORDER_NUM, I.ID, P.ID";
+ + " order by I.N_ORDER_NUM, I.ID, PROP_NAME DESC, V.ORDER_NUM";
FIND_NODE_MAIN_PROPERTIES_BY_PARENTID_CQ =
"select I.NAME, V.DATA"
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2010-02-25
19:28:16 UTC (rev 1953)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2010-02-25
20:36:58 UTC (rev 1954)
@@ -214,7 +214,7 @@
"select I.*, P.NAME AS PROP_NAME, V.ORDER_NUM, V.DATA"
+ " from JCR_SITEM I, JCR_SITEM P, JCR_SVALUE V"
+ " where I.CONTAINER_NAME=? and I.PARENT_ID=? and I.I_CLASS=1 and
(P.CONTAINER_NAME=? and P.PARENT_ID=I.ID and P.I_CLASS=2 and
(
P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' or
P.NAME='[http://www.jcp.org/jcr/1.0]mixinTypes' or
P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner' or
P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions') and
V.PROPERTY_ID=P.ID)"
- + " order by I.N_ORDER_NUM, I.ID, P.ID";
+ + " order by I.N_ORDER_NUM, I.ID, PROP_NAME DESC, V.ORDER_NUM";
FIND_NODE_MAIN_PROPERTIES_BY_PARENTID_CQ =
"select I.NAME, V.DATA"