Need help on SQL2 under AEM 6.5
Hello All,
We are having lot of folders under AEM / DAM / Assets folder. To retrieve the folders we are firing a query under SQL2 through CRDXLite.
"select * from [nt:unstructured] where ISDESCENDANTNODE([/content/dam/all-campaigns]) AND [OWNEDBY]='{name}' and [CAMPAIGNNAME] IS NOT NULL order by [CAMPAIGNNAME]ASC
But when we execute this query we are getting an error " The query read or traversed more than 100000 nodes. To avoid affecting other tasks, processing was stopped". (snapshot attached for reference with the error).

But if we fire "select * from [dam:Asset]" it returns the result with more that 100000 records.
Not sure what we are missing here. Can someone please help.
Thanks you all in advance.
Regards.