mirror of https://github.com/apache/druid.git
Additional documentation for query caching (#10503)
* Add documentation for when caching is unsupported * Minor changes * Minor doc fix * Review comments * Add more details * Fix spelling check * Fix doc for union query * Trailing dot
This commit is contained in:
parent
c3cb0e8b02
commit
04546b65ec
|
@ -82,3 +82,17 @@ Note that the task executor processes only support caches that keep their data l
|
|||
This restriction exists because the cache stores results at the level of intermediate partial segments generated by the
|
||||
ingestion tasks. These intermediate partial segments will not necessarily be identical across task replicas, so
|
||||
remote cache types such as `memcached` will be ignored by task executor processes.
|
||||
|
||||
## Unsupported queries
|
||||
|
||||
Query caching is not available for following:
|
||||
- Queries, that involve a `union` datasource, do not support result-level caching. Refer to the
|
||||
[related issue](https://github.com/apache/druid/issues/8713) for details. Please note that not all union SQL queries are executed using a union datasource. You can use the `explain` operation to see how the union query in sql will be executed.
|
||||
- Queries, that involve an `Inline` datasource or a `Lookup` datasource, do not support any caching.
|
||||
- Queries, with a sub-query in them, do not support any caching though the output of sub-queries itself may be cached.
|
||||
Refer to the [Query execution](query-execution.md#query) page for more details on how sub-queries are executed.
|
||||
- Join queries do not support any caching on the broker [More details](https://github.com/apache/druid/issues/10444).
|
||||
- GroupBy v2 queries do not support any caching on broker [More details](https://github.com/apache/druid/issues/3820).
|
||||
- Data Source Metadata queries are not cached anywhere.
|
||||
- Queries, that have `bySegment` set in the query context, are not cached on the broker. They are currently cached on
|
||||
historical but this behavior will potentially be removed in the future.
|
||||
|
|
|
@ -113,6 +113,16 @@ use table datasources.
|
|||
### `union`
|
||||
|
||||
<!--DOCUSAURUS_CODE_TABS-->
|
||||
<!--SQL-->
|
||||
```sql
|
||||
SELECT col1, COUNT(*)
|
||||
FROM (
|
||||
SELECT col1, col2, col3 FROM tbl1
|
||||
UNION ALL
|
||||
SELECT col1, col2, col3 FROM tbl2
|
||||
)
|
||||
GROUP BY col1
|
||||
```
|
||||
<!--Native-->
|
||||
```json
|
||||
{
|
||||
|
@ -134,8 +144,6 @@ another will be treated as if they contained all null values in the tables where
|
|||
The list of "dataSources" must be nonempty. If you want to query an empty dataset, use an [`inline` datasource](#inline)
|
||||
instead.
|
||||
|
||||
Union datasources are not available in Druid SQL.
|
||||
|
||||
Refer to the [Query execution](query-execution.md#union) page for more details on how queries are executed when you
|
||||
use union datasources.
|
||||
|
||||
|
|
Loading…
Reference in New Issue