VCS searches involving ecm:path STARTSWITH need to call the NX_IN_TREE stored procedure, which is costly on a large number of documents.
This should be replaced by the use of a specialized "descendants" table holding all (document id, descendant id) couples, maintained using triggers.
There are no Sub-Tasks for this issue.