vtlim commented on code in PR #18179: URL: https://github.com/apache/druid/pull/18179#discussion_r2193652267
########## docs/querying/set-query-context.md: ########## @@ -0,0 +1,240 @@ +--- +id: set-query-context +title: "Set query context" +sidebar_label: "Set query context" +--- + +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + +The query context gives you fine-grained control over how Apache Druid executes your individual queries. While the default settings in Druid work well for most queries, you can set query context to handle specific requirements and optimize performance. + +Common use cases for the query context include: +- Override default timeouts for long-running queries or complex aggregations. +- Control resource usage to prevent expensive queries from overwhelming your cluster. +- Debug query performance by disabling caching during testing. +- Configure SQL-specific behaviors like time zones for accurate time-based analysis. +- Set priorities to ensure critical queries get computational resources first. +- Adjust memory limits for queries that process large datasets. + +Druid provides several ways to set query context, and the method you use depends on how and where you're submitting your query. +This guide lists how to set query context for each method of submitting queries. Review Comment: "how to set **the** query context" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
