-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 7.10, 8.3
-
Fix Version/s: 8.10
-
Component/s: Dashboard / OpenSocial (deprecated)
-
Tags:
-
Sprint:nxBD 8.4.4, nxBD 8.4.5
-
Story Points:2
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