ALF-11957: Merged PATCHES/V3.4.6 to HEAD

32617: ALF-11879: IMAP performance
      - Fix node batch loading - batch load ContentData to avoid N+1 problem with content properties
      - During cache preloading, use distinct transactions for each folder search, thus avoiding blowing the transactional caches
   32619: ALF-11879: Fixed typo
   32652: ALF-11879: Deactivate auto-versioning and auditing (and run as system) whilst setting magic IMAP aspect properties


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32673 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-12-09 12:54:10 +00:00
parent ce7f4f8345
commit 658e968320
6 changed files with 186 additions and 72 deletions

View File

@@ -264,6 +264,26 @@
cd.id = ?
</select>
<!-- Get ContentData entities by node ID -->
<select id="select_ContentDataByNodeIds" parameterType="Ids" resultMap="result_ContentData">
select
cd.id as id,
cd.version as version,
cd.content_url_id as content_url_id,
cu.content_url as content_url,
cu.content_size as content_size,
cd.content_mimetype_id as content_mimetype_id,
cd.content_encoding_id as content_encoding_id,
cd.content_locale_id as content_locale_id
from
alf_content_data cd
left join alf_content_url cu on (cd.content_url_id = cu.id)
left join alf_node_properties np on (cd.id = np.long_value)
where
np.node_id in <iterate property="ids" open="(" close=")" conjunction=",">#ids[]#</iterate> and
(np.actual_type_n = 3 or np.actual_type_n = 21)
</select>
<!-- Get the ContentData entity by Node and property QName -->
<select id="select_ContentDataByNodeAndQName" parameterType="Ids" resultType="long">
select