MarkLogic 9 Product Documentation
op:explain

op:explain(
   $plan as map:map,
   $format as xs:string
) as map:map

Summary

This method returns a representation of the builtin execution plan.

Parameters
$plan The Optic Plan. You can either use the XQuery => chaining operator or specify the variable that captures the return value from the previous operation.
$format The format of the returned plan, expressed as a lower-case string. This can be either xml (default) or json.

Example


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() 
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy