diff --git a/docs/user/optimization/optimization.rst b/docs/user/optimization/optimization.rst index f55c1545a1..c4aab0e3aa 100644 --- a/docs/user/optimization/optimization.rst +++ b/docs/user/optimization/optimization.rst @@ -85,6 +85,31 @@ Elasticsearch Specific Optimization The Elasticsearch `Query DSL `_ and `Aggregation `_ also enabling the storage engine specific optimization. +Push Project Into Query DSL +--------------------------- +The Project list will push down to Query DSL to `filter the source `_:: + + sh$ curl -sS -H 'Content-Type: application/json' \ + ... -X POST localhost:9200/_opendistro/_sql/_explain \ + ... -d '{"query" : "SELECT age FROM accounts"}' + { + "root": { + "name": "ProjectOperator", + "description": { + "fields": "[age]" + }, + "children": [ + { + "name": "ElasticsearchIndexScan", + "description": { + "request": "ElasticsearchQueryRequest(indexName=accounts, sourceBuilder={\"from\":0,\"size\":200,\"timeout\":\"1m\",\"_source\":{\"includes\":[\"age\"],\"excludes\":[]}}, searchDone=false)" + }, + "children": [] + } + ] + } + } + Filter Merge Into Query DSL ---------------------------