Loading TOC...

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() 
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.