Loading TOC...


   sql as String,
   [options as String[]]
) as ObjectNode


Returns a node representing the query plan of the given SQL SELECT query. Raises an error if the SQL query is not a SELECT query.

sql The SQL query to be executed.
options Options as a sequence of string values. Available options are:
Sets the optimization level to use. Levels of 0 (off), 1, and 2 are recognized. The default is 1.
Outputs an XML format query plan. This is the default.
Outputs a JSON format query plan. The default is "xml".

Required Privileges



xdmp.sqlPlan("select  customername, customersince\n\
from customers\n\
where year(customersince)  >  2000\n\
and year(customersince)  <  2013")

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