<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Postgresql logging of long running queries in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57268#M20618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For an equivalent CMIS query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; cmis:document &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; doc &lt;SPAN class="keyword token"&gt;JOIN&lt;/SPAN&gt; cm:titled &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; title &lt;BR /&gt;&amp;nbsp; &lt;SPAN class="keyword token"&gt;ON&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmis:objectId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmis:objectId &lt;BR /&gt;&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; IN_TREE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;doc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 'workspace:&lt;SPAN class="comment token"&gt;//SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') &lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="operator token"&gt;AND&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cm:description &lt;SPAN class="operator token"&gt;like&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'A%'&lt;/SPAN&gt;&lt;BR /&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have following output in the logs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;alfresco | 2018-10-25 07:57:36,860 DEBUG [impl.solr.DbOrIndexSwitchingQueryLanguage] [http-nio-8080-exec-4] Using SOLR query: db-cmis for SearchParameters [language=cmis-alfresco, query=SELECT doc.*, title.* FROM cmis:document AS doc JOIN cm:titled AS title ON doc.cmis:objectId = title.cmis:objectId WHERE IN_TREE(doc, 'workspace://SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') AND title.cm:description like 'A%', stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=http://www.alfresco.org/model/content/1.0, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,759 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] Sent :/solr/alfresco/cmis?wt=json&amp;amp;fl=DBID%2Cscore&amp;amp;rows=100&amp;amp;df=TEXT&amp;amp;start=0&amp;amp;locale=en&amp;amp;alternativeDic=DEFAULT_DICTIONARY&amp;amp;cmisVersion=CMIS_1_1&amp;amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,761 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] with: {"tenants":[""],"defaultNamespace":"http://www.alfresco.org/model/content/1.0","defaultFTSFieldOperator":"AND","query":"SELECT doc.*, title.* FROM cmis:document AS doc JOIN cm:titled AS title ON doc.cmis:objectId = title.cmis:objectId WHERE IN_TREE(doc, 'workspace://SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') AND title.cm:description like 'A%'","templates":[],"allAttributes":[],"queryConsistency":"DEFAULT","authorities":["GROUP_EVERYONE","ROLE_ADMINISTRATOR","ROLE_AUTHENTICATED","admin"],"locales":["en_"],"textAttributes":[],"defaultFTSOperator":"AND","anyDenyDenies":true,"mlAnalaysisMode":"EXACT_LANGUAGE_AND_ALL"}&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,763 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] Got: 1 in 638 ms&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,764 DEBUG [impl.solr.DbOrIndexSwitchingQueryLanguage] [http-nio-8080-exec-4] SOLR returned 1 results in 903ms&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it looks that the query is performed by SOLR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have enabled following loggers at&amp;nbsp;&lt;SPAN style="color: #c7254e; background-color: #f9f2f4; font-weight: 400;"&gt;/opt/alfresco/tomcat/shared/classes/alfresco/extension/custom-log4j.properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=DEBUG&lt;BR /&gt;log4j.logger.org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage=DEBUG&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2018 08:00:33 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2018-10-25T08:00:33Z</dc:date>
    <item>
      <title>CMIS query taking long - performance issue?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57263#M20613</link>
      <description>Alfresco Community Edition 5.2 (Default settings)Has anyone done anything with the logging on the Postgresql database side for Alfresco?In the postgresql.conf file, I have the following propertieslog_destination&amp;nbsp; = 'stderr'logging_collector = onlog_directory = 'pg_log'log_filename = 'postgresql-%Y-%</description>
      <pubDate>Tue, 23 Oct 2018 20:49:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57263#M20613</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-10-23T20:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57264#M20614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Not sure about this, but probably the query is served by SOLR instead of database. Can you check it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 06:57:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57264#M20614</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-24T06:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57265#M20615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would I check if my CMIS is going through Solr or hitting PostgreSQL directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not clear on this yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, following are my CMIS queries.&lt;/P&gt;&lt;P&gt;Following some material online is not clear to me.&lt;/P&gt;&lt;P&gt;Unless we see somewhere in the log or some kind of indicator that this is hitting Solr or hitting database, we cannot say for sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT doc.*, saloalias.* FROM cmis:document AS doc JOIN salo:documentProperties AS saloalias ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = saloalias.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId&amp;nbsp; WHERE&amp;nbsp; IN_TREE(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405')&amp;nbsp; AND (saloalias.salo:lo_link = 1965) AND (saloalias.salo:lo_category = 'Bond')&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT doc.*, saloalias.* FROM cmis:document AS doc JOIN salo:documentProperties AS saloalias ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = saloalias.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE IN_FOLDER(doc, 'workspace://SpacesStore/9315813f-ac89-4b05-9281-ce04eda1cf7d') AND (saloalias.salo:lo_link = 1965) AND (saloalias.salo:lo_category = 'Pers')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;salo:documentProperties is our own custom aspect for our own type.&lt;/P&gt;&lt;P&gt;Please note that all the conditions in the where clause has our custom aspect properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:41:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57265#M20615</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-10-24T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57266#M20616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW, I was able to generate file logs. I also did application level p6spy logging.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting lots of log information. So many queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing this initial work on my development machine first before getting on to the production server.&lt;/P&gt;&lt;P&gt;In my development machine, I have the same environment pretty much. I mean Alfresco 5.2 community and Postgresql 9.4, etc. And our J2EE project connecting to this Alfresco.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, in the p6spy approach, I get queries like this logged in the p6spy.log. These queries look similar to the queries that are logged in the postgres log files as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff9900;"&gt;select&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as id,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentNode.id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as parentNodeId,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentNode.version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as parentNodeVersion,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentStore.protocol&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as parentNodeProtocol,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentStore.identifier&amp;nbsp; &amp;nbsp; &amp;nbsp; as parentNodeIdentifier,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentNode.uuid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as parentNodeUuid,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;childNode.id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as childNodeId,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;childNode.version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as childNodeVersion,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;childStore.protocol&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as childNodeProtocol,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;childStore.identifier&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as childNodeIdentifier,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;childNode.uuid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as childNodeUuid,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.type_qname_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as type_qname_id,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.child_node_name_crc&amp;nbsp; &amp;nbsp;as child_node_name_crc,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.child_node_name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as child_node_name,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.qname_ns_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as qname_ns_id,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.qname_localname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as qname_localname,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.is_primary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as is_primary,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.assoc_index&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as assoc_index&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alf_child_assoc assoc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;join alf_node parentNode on (parentNode.id = assoc.parent_node_id)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;join alf_store parentStore on (parentStore.id = parentNode.store_id)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;join alf_node childNode on (childNode.id = assoc.child_node_id)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;left join alf_store childStore on (childStore.id = childNode.store_id)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;where&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parentNode.id = 452&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; order by&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.assoc_index ASC,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assoc.id ASC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666699;"&gt;select acs.id from alf_acl_change_set acs where acs.commit_time_ms = ( select max(commit_time_ms) from alf_acl_change_set where commit_time_ms &amp;lt;= 1540411920042 )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff9900;"&gt;update alf_lock set version = version + 1, lock_token = 'not-locked', start_time = 0, expiry_time = 0 where excl_resource_id = 7 and lock_token = '90d3e150-8886-4307-8746-593805757475'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666699;"&gt;select txn.id as id, txn.commit_time_ms as commit_time_ms, count(case when node.type_qname_id != 149 then 1 end) as updates, count(case when node.type_qname_id = 149 then 1 end) as deletes from alf_transaction txn join alf_node node on (txn.id = node.transaction_id) WHERE txn.commit_time_ms &amp;gt;= 1540408271763 and txn.commit_time_ms &amp;lt; 1540411871763 group by txn.commit_time_ms, txn.id order by txn.commit_time_ms ASC, txn.id ASC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh boy, now I am into this mystery of identifying the (PostgreSQL) database queries that exactly correspond to my CMIS query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still I am not clear on this question - Are my CMIS queries going through Solr or directly to the database?&lt;/P&gt;&lt;P&gt;As you said, first I need to be sure on this.&lt;/P&gt;&lt;P&gt;Any directions for this would be a great help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:52:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57266#M20616</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-10-24T20:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57267#M20617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably this can help:&lt;/P&gt;&lt;P&gt;&lt;A class="jivelink1" href="https://www.zylk.net/en/web-2-0/blog/-/blogs/how-to-get-logs-for-alfresco-querys" title="https://www.zylk.net/en/web-2-0/blog/-/blogs/how-to-get-logs-for-alfresco-querys" rel="nofollow noopener noreferrer"&gt;https://www.zylk.net/en/web-2-0/blog/-/blogs/how-to-get-logs-for-alfresco-querys&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2018 07:50:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57267#M20617</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-25T07:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57268#M20618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For an equivalent CMIS query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;SELECT&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; cmis:document &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; doc &lt;SPAN class="keyword token"&gt;JOIN&lt;/SPAN&gt; cm:titled &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; title &lt;BR /&gt;&amp;nbsp; &lt;SPAN class="keyword token"&gt;ON&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmis:objectId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cmis:objectId &lt;BR /&gt;&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; IN_TREE&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;doc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 'workspace:&lt;SPAN class="comment token"&gt;//SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') &lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="operator token"&gt;AND&lt;/SPAN&gt; title&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cm:description &lt;SPAN class="operator token"&gt;like&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'A%'&lt;/SPAN&gt;&lt;BR /&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have following output in the logs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;alfresco | 2018-10-25 07:57:36,860 DEBUG [impl.solr.DbOrIndexSwitchingQueryLanguage] [http-nio-8080-exec-4] Using SOLR query: db-cmis for SearchParameters [language=cmis-alfresco, query=SELECT doc.*, title.* FROM cmis:document AS doc JOIN cm:titled AS title ON doc.cmis:objectId = title.cmis:objectId WHERE IN_TREE(doc, 'workspace://SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') AND title.cm:description like 'A%', stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=http://www.alfresco.org/model/content/1.0, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,759 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] Sent :/solr/alfresco/cmis?wt=json&amp;amp;fl=DBID%2Cscore&amp;amp;rows=100&amp;amp;df=TEXT&amp;amp;start=0&amp;amp;locale=en&amp;amp;alternativeDic=DEFAULT_DICTIONARY&amp;amp;cmisVersion=CMIS_1_1&amp;amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,761 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] with: {"tenants":[""],"defaultNamespace":"http://www.alfresco.org/model/content/1.0","defaultFTSFieldOperator":"AND","query":"SELECT doc.*, title.* FROM cmis:document AS doc JOIN cm:titled AS title ON doc.cmis:objectId = title.cmis:objectId WHERE IN_TREE(doc, 'workspace://SpacesStore/b457a0ba-7bb6-4ee6-94b0-adca866ab777') AND title.cm:description like 'A%'","templates":[],"allAttributes":[],"queryConsistency":"DEFAULT","authorities":["GROUP_EVERYONE","ROLE_ADMINISTRATOR","ROLE_AUTHENTICATED","admin"],"locales":["en_"],"textAttributes":[],"defaultFTSOperator":"AND","anyDenyDenies":true,"mlAnalaysisMode":"EXACT_LANGUAGE_AND_ALL"}&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,763 DEBUG [impl.solr.SolrQueryHTTPClient] [http-nio-8080-exec-4] Got: 1 in 638 ms&lt;BR /&gt;alfresco | 2018-10-25 07:57:37,764 DEBUG [impl.solr.DbOrIndexSwitchingQueryLanguage] [http-nio-8080-exec-4] SOLR returned 1 results in 903ms&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it looks that the query is performed by SOLR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have enabled following loggers at&amp;nbsp;&lt;SPAN style="color: #c7254e; background-color: #f9f2f4; font-weight: 400;"&gt;/opt/alfresco/tomcat/shared/classes/alfresco/extension/custom-log4j.properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=DEBUG&lt;BR /&gt;log4j.logger.org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage=DEBUG&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2018 08:00:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57268#M20618</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-25T08:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Postgresql logging of long running queries</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57269#M20619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for your assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the alfresco log. I did not check the Solr log.&lt;/P&gt;&lt;P&gt;I have both the IN_TREE query and the IN_FOLDER query. First time creating a document for an entity, it will create a folder under the specific site (for the client). Until it creates a folder, it will call IN_TREE query. Once the folder is created for an entity, then IN_FOLDER query will be called.&lt;/P&gt;&lt;P&gt;Following is the log. First one is for IN_TREE, and the last one is the IN_FOLDER. Scroll all the way down to see IN_FOLDER case.&lt;/P&gt;&lt;P&gt;As I see, IN_TREE goes through Solr. IN_FOLDER goes to DB directly.&lt;/P&gt;&lt;P&gt;For here, I forced calling this IN_TREE from CMIS workbench.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Am I reading/interpreting the log correctly?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, I am wondering, what makes the IN_FOLDER query to take more than 20 seconds to return in&amp;nbsp;our production environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note this organization/structure of documents in our repository:&amp;nbsp;Site-&amp;gt;Document Library-&amp;gt;Folder for each document category-&amp;gt;Folder for each entity that belongs to a category-&amp;gt;documents that belong to the entity.&lt;/P&gt;&lt;P&gt;Now, when I try to retrieve documents of an entity that belongs to a category whose folder contains several million documents, it takes 20 seconds.&lt;/P&gt;&lt;P&gt;But when I retrieve documents of an entity that belongs to a category whose folder contains less than 100K documents, then it comes back in few milliseconds.&lt;/P&gt;&lt;P&gt;I also notice one thing. First time, I retrieve these documents of this large folder, it is fast. After the first time, it is consistently slow. I have tested this several times and confirmed this behavior in our production environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the performance issue I am seeing and trying to address.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;As other experts in the forum suggested, since the IN_FOLDER against a large folder is taking more than 20 seconds, and it is going to DB directly, we can put some indices in place and see if it helps.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am having a hard time in finding/identifying a one to one mapping between my CMIS retrieval query to a postgresql query.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To create the indices, do I need to find the postgresql query and do explain plan, etc.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any guidance on the direction/step that I could take, would help me a lot.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-size: 22px;"&gt;&lt;STRONG&gt;Alfresco log information&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt;&lt;STRONG&gt;IN_TREE related log&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2018-10-25 09:23:56,343 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-6]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Trying db query&lt;/STRONG&gt; for db-cmis for SearchParameters [&lt;/P&gt;&lt;P&gt;language=cmis-alfresco,&lt;/P&gt;&lt;P&gt;query=&lt;SPAN style="color: #0000ff;"&gt;SELECT doc.*, SALO_ALIAS.* FROM cmis:document AS doc JOIN salo:documentProperties AS SALO_ALIAS ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = SALO_ALIAS.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE &lt;STRONG&gt;IN_TREE&lt;/STRONG&gt;(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405') AND (SALO_ALIAS.salo:lo_link = 1965) AND (SALO_ALIAS.salo:lo_category = 'Lic')&lt;/SPAN&gt; , &lt;SPAN style="font-size: 12px; color: #999999;"&gt;&lt;SPAN&gt;stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2018-10-25 09:23:56,472 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-6]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DB query failed&lt;/STRONG&gt; for db-cmis for SearchParameters [&lt;/P&gt;&lt;P&gt;language=cmis-alfresco,&lt;/P&gt;&lt;P&gt;query=&lt;SPAN style="color: #0000ff;"&gt;SELECT doc.*, SALO_ALIAS.* FROM cmis:document AS doc JOIN salo:documentProperties AS SALO_ALIAS ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = SALO_ALIAS.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE &lt;STRONG&gt;IN_TREE&lt;/STRONG&gt;(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405') AND (SALO_ALIAS.salo:lo_link = 1965) AND (SALO_ALIAS.salo:lo_category = 'Lic')&lt;/SPAN&gt; , &lt;SPAN style="font-size: 12px; color: #999999;"&gt;&lt;SPAN&gt;stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;org.alfresco.repo.search.impl.querymodel.QueryModelException: 09250171 &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Descendant/IN_TREE() is unsupported&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; at org.alfresco.repo.search.impl.querymodel.impl.db.functions.DBDescendant.prepare(DBDescendant.java:75)&lt;BR /&gt; at org.alfresco.repo.search.impl.querymodel.impl.db.DBFunctionalConstraint.prepare(DBFunctionalConstraint.java:80)&lt;BR /&gt; at org.alfresco.repo.search.impl.querymodel.impl.db.DBConjunction.prepare(DBConjunction.java:83)&lt;BR /&gt; at org.alfresco.repo.search.impl.querymodel.impl.db.DBQuery.prepare(DBQuery.java:225)&lt;BR /&gt; at org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryEngine.executeQuery(DBQueryEngine.java:207)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;2018-10-25 09:23:56,474 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-6]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using SOLR query:&lt;/STRONG&gt; db-cmis for SearchParameters [&lt;/P&gt;&lt;P&gt;language=cmis-alfresco,&lt;/P&gt;&lt;P&gt;query=SELECT doc.*, SALO_ALIAS.* FROM cmis:document AS doc JOIN salo:documentProperties AS SALO_ALIAS ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = SALO_ALIAS.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE IN_TREE(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405') AND (SALO_ALIAS.salo:lo_link = 1965) AND (SALO_ALIAS.salo:lo_category = 'Lic') , &lt;SPAN style="font-size: 12px; color: #999999;"&gt;&lt;SPAN&gt;stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2018-10-25 09:23:56,668 DEBUG [org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient] [http-apr-8180-exec-6] &lt;STRONG&gt;Sent :/solr4/alfresco/cmis?&lt;/STRONG&gt;&lt;SPAN style="font-size: 12px; color: #808080;"&gt;wt=json&amp;amp;fl=DBID%2Cscore&amp;amp;rows=100&amp;amp;df=TEXT&amp;amp;start=0&amp;amp;locale=en&amp;amp;alternativeDic=DEFAULT_DICTIONARY&amp;amp;cmisVersion=CMIS_1_1&amp;amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #808080;"&gt;&lt;SPAN&gt;2018-10-25 09:23:56,668 DEBUG [org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient] [http-apr-8180-exec-6] with: {"tenants":[""],"defaultNamespace":"&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;","defaultFTSFieldOperator":"AND","query":"SELECT doc.*, SALO_ALIAS.* FROM cmis:document AS doc JOIN salo:documentProperties AS SALO_ALIAS ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = SALO_ALIAS.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE IN_TREE(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405') AND (SALO_ALIAS.salo:lo_link = 1965) AND (SALO_ALIAS.salo:lo_category = 'Lic') ","templates":[],"allAttributes":[],"queryConsistency":"DEFAULT","authorities":["GROUP_EVERYONE","ROLE_ADMINISTRATOR","ROLE_AUTHENTICATED","admin"],"locales":["en_"],"textAttributes":[],"defaultFTSOperator":"AND","anyDenyDenies":false,"mlAnalaysisMode":"EXACT_LANGUAGE_AND_ALL"}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;2018-10-25 09:23:56,668 DEBUG [org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient] [http-apr-8180-exec-6] Got: 7 in 76 ms&lt;BR /&gt;2018-10-25 09:23:56,668 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-6] &lt;STRONG&gt;SOLR returned 7 results in 194ms&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt;&lt;STRONG&gt;IN_FOLDER query&amp;nbsp;related log&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;2018-10-25 10:25:12,062 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-10]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Trying db query for db-cmis&lt;/STRONG&gt; for SearchParameters [&lt;/P&gt;&lt;P&gt;language=cmis-alfresco,&lt;/P&gt;&lt;P&gt;query=&lt;SPAN style="color: #0000ff;"&gt;SELECT doc.*, SALO_ALIAS.* FROM cmis:document AS doc JOIN salo:documentProperties AS SALO_ALIAS ON doc.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId = SALO_ALIAS.cmis&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bjectId WHERE &lt;STRONG&gt;IN_FOLDER&lt;/STRONG&gt;(doc, 'workspace://SpacesStore/9315813f-ac89-4b05-9281-ce04eda1cf7d') AND (SALO_ALIAS.salo:lo_link = 1965) AND (SALO_ALIAS.salo:lo_category = 'Lic'),&lt;/SPAN&gt; &lt;SPAN style="color: #999999; font-size: 12px;"&gt;&lt;SPAN&gt;stores=[workspace://SpacesStore], queryParameterDefinitions=[], excludeDataInTheCurrentTransaction=false, sortDefinitions=[], locales=[en], mlAnalaysisMode=EXACT_LANGUAGE_AND_ALL, limitBy=FINAL_SIZE, permissionEvaluation=EAGER, limit=100, allAttributes=[], textAttributes=[], maxItems=100, skipCount=0, defaultFTSOperator=AND, defaultFTSFieldOperator=AND, queryTemplates={}, namespace=&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;, maxPermissionChecks=-1, maxPermissionCheckTimeMillis=-1, defaultFieldName=TEXT, fieldFacets=[], facetQueries=[], filterQueries=[], pivots=[], stats=null, useInMemorySort=null, maxRawResultSetSizeForInMemorySort=null, extraParameters={cmisVersion=CMIS_1_1}, excludeTenantFilter=false, isBulkFetchEnabled=true, queryConsistency=DEFAULT, sinceTxId=null, searchTerm=null, highlight=null, interval=null, range=null, timezone=null, spellCheck=false]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;2018-10-25 10:25:12,070 DEBUG [org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage] [http-apr-8180-exec-10] &lt;STRONG&gt;DB returned 7 results in 8ms&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2018 15:25:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-taking-long-performance-issue/m-p/57269#M20619</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-10-25T15:25:19Z</dc:date>
    </item>
  </channel>
</rss>

