description |
---|
To query using distributed joins, window functions, and other multi-stage operators in real time, turn on the multi-stage query engine (v2). |
To query using distributed joins, window functions, and other multi-stage operators in real time, you must enable the multi-stage query engine (v2). To enable v2, do any of the following:
- Enable the multi-stage query engine in the Query Console
- Programmatically access the multi-stage query engine:
- Query using REST APIs
- Query outside of the APIs using the query option
To learn more about what the multi-stage query engine is, see Multi-stage query engine (v2).
- To enable the multi-stage query engine, in the Pinot Query Console, select the Use Multi-Stage Engine check box.
Pinot Query Console with Use Multi Stage Engine enabled
To query the Pinot multi-stage query engine, use REST APIs or the query option:
The Controller admin API and the Broker query API allow optional JSON payload for configuration. For example:
curl -X POST http://localhost:9000/sql -d
'
{
"sql": "select * from baseballStats limit 10",
"trace": false,
"queryOptions": "useMultistageEngine=true"
}
'
curl -X POST http://localhost:8000/query/sql -d '
{
"sql": "select * from baseballStats limit 10",
"trace": false,
"queryOptions": "useMultistageEngine=true"
}
'
To enable the multi-stage engine via a query outside of the API, add the useMultistageEngine=true
option to the top of your query.
For example:
SET useMultistageEngine=true; -- indicator to enable the multi-stage engine.
SELECT * from baseballStats limit 10