<?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 listPage doesn't improve query time for createHistoricProcessInstanceQuery when using includeProcessVariables in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/listpage-doesn-t-improve-query-time-for/m-p/209176#M162306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;includeProcessVariables() in HistoricProcessInstanceQuery increases query time very very seriously. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Query times are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without includeProcessVariables() : &amp;amp;lt 1s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With includeProcessVariables() : 20-30s&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so I decided to use .listPage( first, pageSize ) but with values like ( 0, 10 ) it is still the same 20-30s&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;interesting that when using variableValueLike( "searchValue%", searchValue ) that returns 10-20 items it queries quick: 1-2s&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand that includeProcessVariables() increases query time but &lt;/SPAN&gt;&lt;STRONG&gt;why listPage( first, pageSize ) doesn't improve?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is my query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;HistoricProcessInstance&amp;gt; result = historyService.createHistoricProcessInstanceQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.processDefinitionKey( "Process1" )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.finished()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.variableValueLike( "searchString", searchValue )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.includeProcessVariables()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.orderByProcessInstanceStartTime()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.desc()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.listPage( first, pageSize );&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;/SPAN&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>Sun, 30 Aug 2015 07:53:08 GMT</pubDate>
    <dc:creator>p4w3l</dc:creator>
    <dc:date>2015-08-30T07:53:08Z</dc:date>
    <item>
      <title>listPage doesn't improve query time for createHistoricProcessInstanceQuery when using includeProcessVariables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/listpage-doesn-t-improve-query-time-for/m-p/209176#M162306</link>
      <description>includeProcessVariables() in HistoricProcessInstanceQuery increases query time very very seriously. Query times are:Without includeProcessVariables() : &amp;amp;lt 1sWith includeProcessVariables() : 20-30sso I decided to use .listPage( first, pageSize ) but with values like ( 0, 10 ) it is still the sam</description>
      <pubDate>Sun, 30 Aug 2015 07:53:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/listpage-doesn-t-improve-query-time-for/m-p/209176#M162306</guid>
      <dc:creator>p4w3l</dc:creator>
      <dc:date>2015-08-30T07:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: listPage doesn't improve query time for createHistoricProcessInstanceQuery when using includeProcessVariables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/listpage-doesn-t-improve-query-time-for/m-p/209177#M162307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if you'll have a look into the code in the class: HistoricProcessInstanceEntityManager.java&amp;nbsp; at method: findHistoricProcessInstancesAndVariablesByQueryCriteria&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you'll see this comment: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // paging doesn't work for combining process instances and variables due to an outer join, so doing it in-memory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the inconvenient but this is what was possible to be done at that moment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 21:38:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/listpage-doesn-t-improve-query-time-for/m-p/209177#M162307</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-30T21:38:53Z</dc:date>
    </item>
  </channel>
</rss>

