
op:explain( $plan as map:map, [$format as xs:string], [$options as xs:string*] ) as map:map
This method returns a representation of the builtin execution plan.
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-view("main", "employees")
=> op:select(("EmployeeID", "FirstName", "LastName"))
=> op:order-by("EmployeeID")
=> op:explain()
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-view("main", "employees")
=> op:select(("EmployeeID", "FirstName", "LastName"))
=> op:order-by("EmployeeID")
=> op:explain("json",("seed=0", "optimize=1"))
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.