Reply to a comment from John Curtis

No danger of copyright infringement, but I thought I'd post the actual values of the limits being discussed directly from the code

#define QUERY_MAX_DOCSSCANNED_DEFAULT 500000
#define QUERY_MAX_VIEW_ENTRIES_SCANNED_DEFAULT 200000
#define QUERY_MAX_TOTAL_MILLISECONDS 300000

They are self-describing and can be overridden in notes.ini (below names) and via parameters when invoking the DQL engine.

QUERY_MAX_DOCS_SCANNED

QUERY_MAX_VIEW_ENTRIES_SCANNED

QUERY_MAX_MSECS_TOTAL

We will get complaints of their being too high and too low; there simply is no ideal setting.  Indeed, there may be a HUGE query people run at night that sets them only for that one time.  The somewhat heartbreaking thing is that if they are exceeded, the query will fail even after running for a long time.  So, you need to probably set them high and then mediate them after a run.  Or just see what works in your environment.  But the intent is to keep a query from going on forever - server citizenship.

To Karsten's point, DQL does results injection - meaning once we run the cheapest of all sibling terms in a boolean "family", we feed the next and the next with those results, greatly cutting down on cost.
 

Leave your reply right here