<?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 CMIS query performance slow - Solr index improvement? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76695#M24208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This problem is experienced with Alfresco 6.0 (could be in Alfresco 5.2 as well). I do not know how much the version matters to this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom model defined. This mode has a custom type and it has a custom aspect with a set of properties.&lt;/P&gt;&lt;P&gt;We use CMIS API to communicate with the repository. Functionally, everything has been working great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in order to show the information on the document objects (without the binary content), we use the following query through CMIS API. It is clear that the execution of this query through CMIS is taking long to respond.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;SELECT doc.*, slo.* &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;FROM cmis:document AS doc &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;&amp;nbsp; &amp;nbsp; JOIN slo:documentProperties AS &lt;STRONG&gt;sloalias&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;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 = &lt;STRONG&gt;sloalias&lt;/STRONG&gt;.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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;WHERE&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;&amp;nbsp; &amp;nbsp; IN_TREE(doc, 'workspace://SpacesStore/0a813931-e5d4-4a4a-82ad-8ccbbd1c2405')&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;&amp;nbsp; &amp;nbsp;AND (&lt;STRONG&gt;sloalias&lt;/STRONG&gt;.slo:mlo_link = 1451) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'book antiqua', palatino, serif; color: #0000ff;"&gt;&amp;nbsp; &amp;nbsp;AND (&lt;STRONG&gt;sloalias&lt;/STRONG&gt;.slo:mlo_category = 'Person')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;slo:documentProperties&lt;/STRONG&gt; is the custom aspect.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0a813931-e5d4-4a4a-82ad-8ccbbd1c2405 is the id of the folder under which the document would reside&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Suppose we remove the calling of this query, the page loads very fast.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With this query executing, in a production system with millions of documents, it is consistently taking 20 seconds to respond.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please note that, on my (custom) model definition, I have not done anything special with respect to indexing (the properties). So, whatever is happening must be from the default behavior.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wonder if the improper usage IN_TREE is the cause of slowness. Because I have read somewhere saying, we can write CMIS query in such a way not to go through Solr (indexing), whether it is a good idea or not.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also wonder if this performance issue has anything to do with other things like default auditing, or default (excessive) logging, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2018 15:32:16 GMT</pubDate>
    <dc:creator>sepgs2004</dc:creator>
    <dc:date>2018-09-17T15:32:16Z</dc:date>
    <item>
      <title>CMIS query performance slow - Solr index improvement?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76695#M24208</link>
      <description>This problem is experienced with Alfresco 6.0 (could be in Alfresco 5.2 as well). I do not know how much the version matters to this issue.I have a custom model defined. This mode has a custom type and it has a custom aspect with a set of properties.We use CMIS API to communicate with the repository</description>
      <pubDate>Mon, 17 Sep 2018 15:32:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76695#M24208</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-09-17T15:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS query performance slow - Solr index improvement?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76696#M24209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the page size you are requesting for this CMIS query?&amp;nbsp;Have you already set the logger for the&amp;nbsp;SolrQueryHTTPClient class to debug and checked the logs if the long query duration actually originates from the SOLR query call?&amp;nbsp;Do you use dynamic authorities in any of your customisations/extensions, which can indrectly cause some ACL check optimisations to be disbabled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The use of IN_TREE is not necessarily "improper". It is a valid selector. Though if you only need to find documents directly in that folder, and not in any sub-folders, then IN_TREE&amp;nbsp;could be replaced by IN_FOLDER, which would allow the query to execute via DB instead of SOLR. But bear in mind that executing a query against the DB is not necessarily faster than when executed against SOLR.&amp;nbsp;Performance depends on a lot of factors like DB index / statistics state, data selectivity etc. For larger data sets, it is very likely that SOLR is faster more often than a DB query, since&amp;nbsp;a DB query has to perform ACL checking as a post-filter step, causing additional DB interactions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2018 20:45:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76696#M24209</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2018-09-17T20:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS query performance slow - Solr index improvement?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76697#M24210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not do any page size. Typically, our folders would contains no more than 25 documents. We might have millions of folders, but inside a folder, we will not have more than 25 documents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will still do page size, if it is going to make a difference. Please let me know.&lt;/P&gt;&lt;P&gt;I will comment on other things shortly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2018 21:17:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76697#M24210</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-09-17T21:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS query performance slow - Solr index improvement?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76698#M24211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First something I would challenge, do you really need to retrieve all the Metadata fields of your documents with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;doc.*, slo.*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;That can be a lot of fields to gather. Try to tailor the query to your needs.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Second part I would look at&amp;nbsp;is your &lt;A href="https://chemistry.apache.org/docs/cmis-samples/samples/operation-context/index.html" rel="nofollow noopener noreferrer"&gt;CMIS Operation Context&lt;/A&gt;,&amp;nbsp;do you really need the document relationships, actions (we had a 50% gain when deactivating this particular option), ACL and so on?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Hope this helps some out&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 07:52:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-query-performance-slow-solr-index-improvement/m-p/76698#M24211</guid>
      <dc:creator>gluck113</dc:creator>
      <dc:date>2019-05-02T07:52:17Z</dc:date>
    </item>
  </channel>
</rss>

