-
Notifications
You must be signed in to change notification settings - Fork 10
Frequently Asked Questions
In MarkLogic, Optic (and SQL and SPARQL) queries are evaluated in the database at a layer below a user’s JavaScript or XQuery code. The Optic API is effectively a builder for a query plan. That plan is evaluated as a whole such that it can be intelligently optimized. The database uses a variety of strategies such as reordering and cost-based optimization to dynamically execute Optic queries. This is very similar to the way a mature relational database evaluates SQL. The query execution happens in C++, so there’s nothing to debug when you hit .result()
, for example. To better understand what the query optimizer is doing and where your bottlenecks are in Optic queries, use the the explain()
method on a query plan.
In MarkLogic, you can invoke or eval XSLT from JavaScript or XQuery. However, the mlxprs debugger cannot step through XSLT processing. When the debugger hits an XSLT processing call, it will step over it and continue, just like with other built-in functions.