From 17038dff1346acbed69df676e86cab763472549c Mon Sep 17 00:00:00 2001 From: Maytas Monsereenusorn Date: Tue, 23 Jun 2020 15:57:59 -1000 Subject: [PATCH 1/2] Enable query vectorization by default --- .../src/main/java/org/apache/druid/query/QueryContexts.java | 2 +- .../java/org/apache/druid/query/groupby/GroupByQueryConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/src/main/java/org/apache/druid/query/QueryContexts.java b/processing/src/main/java/org/apache/druid/query/QueryContexts.java index b5a7be0b7dd8..36675935fc82 100644 --- a/processing/src/main/java/org/apache/druid/query/QueryContexts.java +++ b/processing/src/main/java/org/apache/druid/query/QueryContexts.java @@ -59,7 +59,7 @@ public class QueryContexts public static final boolean DEFAULT_USE_CACHE = true; public static final boolean DEFAULT_POPULATE_RESULTLEVEL_CACHE = true; public static final boolean DEFAULT_USE_RESULTLEVEL_CACHE = true; - public static final Vectorize DEFAULT_VECTORIZE = Vectorize.FALSE; + public static final Vectorize DEFAULT_VECTORIZE = Vectorize.TRUE; public static final int DEFAULT_PRIORITY = 0; public static final int DEFAULT_UNCOVERED_INTERVALS_LIMIT = 0; public static final long DEFAULT_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(5); diff --git a/processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java b/processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java index c31ec267d328..f9945e9cd04b 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java @@ -95,7 +95,7 @@ public class GroupByQueryConfig private int numParallelCombineThreads = 1; @JsonProperty - private boolean vectorize = false; + private boolean vectorize = true; public String getDefaultStrategy() { From d5e47982c46b0aa4756253145f3850b5655859d2 Mon Sep 17 00:00:00 2001 From: Maytas Monsereenusorn Date: Tue, 23 Jun 2020 18:57:48 -1000 Subject: [PATCH 2/2] update docs --- docs/configuration/index.md | 2 +- docs/querying/query-context.md | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index b17b74dbd80d..f3470d02a6bb 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -1774,7 +1774,7 @@ The following configurations are to set the default behavior for query vectoriza |Property|Description|Default| |--------|-----------|-------| -|`druid.query.vectorize`|See [Vectorization parameters](../querying/query-context.html#vectorization-parameters) for details. This value can be overridden by `vectorize` in the query contexts.|`false`| +|`druid.query.vectorize`|See [Vectorization parameters](../querying/query-context.html#vectorization-parameters) for details. This value can be overridden by `vectorize` in the query contexts.|`true`| |`druid.query.vectorSize`|See [Vectorization parameters](../querying/query-context.html#vectorization-parameters) for details. This value can be overridden by `vectorSize` in the query contexts.|`512`| ### TopN query config diff --git a/docs/querying/query-context.md b/docs/querying/query-context.md index e497bd97bfab..89860a6a5c6c 100644 --- a/docs/querying/query-context.md +++ b/docs/querying/query-context.md @@ -98,10 +98,7 @@ include "selector", "bound", "in", "like", "regex", "search", "and", "or", and " Other query types (like TopN, Scan, Select, and Search) ignore the "vectorize" parameter, and will execute without vectorization. These query types will ignore the "vectorize" parameter even if it is set to `"force"`. -Vectorization is a beta-quality feature as of Druid {{DRUIDVERSION}}. We heartily welcome any feedback and testing -from the community as we work to battle-test it. - |property|default| description| |--------|-------|------------| -|vectorize|`false`|Enables or disables vectorized query execution. Possible values are `false` (disabled), `true` (enabled if possible, disabled otherwise, on a per-segment basis), and `force` (enabled, and groupBy or timeseries queries that cannot be vectorized will fail). The `"force"` setting is meant to aid in testing, and is not generally useful in production (since real-time segments can never be processed with vectorized execution, any queries on real-time data will fail). This will override `druid.query.vectorize` if it's set.| +|vectorize|`true`|Enables or disables vectorized query execution. Possible values are `false` (disabled), `true` (enabled if possible, disabled otherwise, on a per-segment basis), and `force` (enabled, and groupBy or timeseries queries that cannot be vectorized will fail). The `"force"` setting is meant to aid in testing, and is not generally useful in production (since real-time segments can never be processed with vectorized execution, any queries on real-time data will fail). This will override `druid.query.vectorize` if it's set.| |vectorSize|`512`|Sets the row batching size for a particular query. This will override `druid.query.vectorSize` if it's set.|