<?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: Query Scalability in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109953#M77199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, there are no RC cycles… The trunk is usually very stable unless you use features marked experimental. You should be safe to test this (me being curious if it solves your ' problem')&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2012 06:20:57 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2012-06-05T06:20:57Z</dc:date>
    <item>
      <title>Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109949#M77195</link>
      <description>I'm currently in evaluation mode to decide if Activiti is the right BPM solution for our project.&amp;nbsp; From an API perspective, everything looks great so far.&amp;nbsp; The APIs are intuitive, and the Spring integration is simple.&amp;nbsp; However, I've noticed a problem with respect to scalability that is concerning.&amp;nbsp;</description>
      <pubDate>Thu, 31 May 2012 22:22:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109949#M77195</guid>
      <dc:creator>brianshowers</dc:creator>
      <dc:date>2012-05-31T22:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109950#M77196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interesting observation ! JDBC pagination is of course pure evil for the numbers you're running. Most database engines support&amp;nbsp; LIMIT/OFFSET syntax that can easily be added to existing queries transparently so i'm a bit surprised MyBatis is not handing this translation natively. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In DbSqlSession there is this bit of code which seems to indicate that this problem has been thought of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(databaseType.equals("mssql") || databaseType.equals("db2")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use mybatis paging (native database paging not yet implemented)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedObjects = sqlSession.selectList(statement, parameter, new RowBounds(parameter.getFirstResult(), parameter.getMaxResults()));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use native database paging&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadedObjects = sqlSession.selectList(statement, parameter);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;But following this, native paging should work for pgsql and mysql. Surely one of the devs will clarify things up &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jorg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 04:53:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109950#M77196</guid>
      <dc:creator>heymjo</dc:creator>
      <dc:date>2012-06-01T04:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109951#M77197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;first of all, great analysis and post. I often see them much, much worse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the myBatis docs it says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Different drivers are able to achieve different levels of efficiency in this regard. For the best performance, use result set types of SCROLL_SENSITIVE or SCROLL_INSENSITIVE (in other words: not FORWARD_ONLY).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which might make a difference… But it would indeed be strange if it did…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In DbSQLSessionFactory there is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; @SuppressWarnings("unchecked")&lt;BR /&gt;&amp;nbsp; protected List filterLoadedObjects(List&amp;lt;Object&amp;gt; loadedObjects) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (loadedObjects.isEmpty()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return loadedObjects;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (! (PersistentObject.class.isAssignableFrom(loadedObjects.get(0).getClass()))) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return loadedObjects;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;PersistentObject&amp;gt; filteredObjects = new ArrayList&amp;lt;PersistentObject&amp;gt;(loadedObjects.size());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (Object loadedObject: loadedObjects) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PersistentObject cachedPersistentObject = cacheFilter((PersistentObject) loadedObject);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filteredObjects.add(cachedPersistentObject);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return filteredObjects;&lt;BR /&gt;&amp;nbsp; }&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;That is also used in the selectList which might also influence things… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yet, indeed the core devs should have a more detailed look at this as I do not have the time for now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 09:03:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109951#M77197</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-06-01T09:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109952#M77198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the replies.&amp;nbsp; I should have mentioned that I did my analysis using the latest official release of Activiti (v5.9).&amp;nbsp; It looks to me like the code that @heymjo pointed out should in fact fix this issue, but it is currently just in the trunk codebase.&amp;nbsp; Digging through the svn logs shows that the DbSqlSession snippet was added in &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1209" rel="nofollow noopener noreferrer"&gt;ACT-1209&lt;/A&gt;&lt;SPAN&gt; to fix this very problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a user of MyBatis myself, I feel the pain.&amp;nbsp; I've made the exact same mistake of assuming that MyBatis will do native SQL pagination when you pass a RowBounds when, in fact, it always just uses JDBC pagination (which, as pointed out, is for various reasons, evil).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I'll just have to wait for 5.10 to be released before we can really consider integrating Activiti.&amp;nbsp; As a &lt;/SPAN&gt;&lt;EM&gt;noob&lt;/EM&gt;&lt;SPAN&gt; question, does the Activiti release cycle ever cut any beta releases prior to the official release?&amp;nbsp; Or do I have to choose between waiting for the official 5.10 release (I think it's currently not scheduled until August) or building my own copy off of the trunk bleeding edge?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 18:43:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109952#M77198</guid>
      <dc:creator>brianshowers</dc:creator>
      <dc:date>2012-06-01T18:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109953#M77199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, there are no RC cycles… The trunk is usually very stable unless you use features marked experimental. You should be safe to test this (me being curious if it solves your ' problem')&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 06:20:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109953#M77199</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-06-05T06:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query Scalability</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109954#M77200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually Daniel came to the same conclusion a while ago. Should indeed be fixed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 14:33:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-scalability/m-p/109954#M77200</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-06-06T14:33:41Z</dc:date>
    </item>
  </channel>
</rss>

