Very slow nxql query with some filters
Hello,
I have a nuxeo with mongoDB which contains a lot of data.
My problem is that the following nxql query is very slow: select * from Document where ecm:isTrashed = 0
By removing the filter on ecm:isTrashed
, I will have an immediate response, That's why I thought about adding an index for ecm: isTrashed
in mongodb but the problem still persists.
For your information, while consulting my documents with mongoDB compass, I noticed that ecm: isTrashed does not appear in the json of my documents and it will be added only for the documents which are in the trash, maybe it is therefore, creating an index does not solve the problem.
Do you have an idea please
Also, elasticsearch queries are very fast but I have the problem only with NXQL.
If so, does this action not have an impact on a production platform in use?