Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20358

Default Dashboard query

    XMLWordPrintable

    Details

    • Tags:
    • Sprint:
      nxBD 8.4.4, nxBD 8.4.5
    • Story Points:
      2

      Description

      Some of the default dashboard contain queries that do not scale as expected.

      Here is a typical example :

      In nuxeo-user-dashboard we have some contentviews, one of them being
      the domain_documents ContentView.

      Looking at the associated definition what we see is :

      <coreQueryPageProvider name="domain_documents">
            <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
            <pattern>
              SELECT * FROM Document WHERE ecm:path STARTSWITH ?
              AND ecm:mixinType != 'Folderish' AND ecm:mixinType !=
              'SystemDocument' AND ecm:mixinType !=
              'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:isProxy = 0
              AND ecm:currentLifeCycleState != 'deleted'
            </pattern>
            <sort column="dc:modified" ascending="false" />
            <pageSize>5</pageSize>
          </coreQueryPageProvider>
      

      The problem here is that if we have a domain with 500,000 documents, we are asking the core to basically read all the records in order to sort them before displaying 5 of them.

      This is typically something that works on a dev box, but not on a real server with real data !

      There are mainly 2 work around :

      • migrate the PageProvider to use ElasticSearch
      • build a custom PageProvider that uses Audit Log in order to get tha last modified documents page by page and post filter according to user rights

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: