SQL Hints
Batch Streaming
SQL hints can be used with SQL statements to alter execution plans. This chapter explains how to use hints to force various approaches.
SQL提示可以与SQL语句一起使用,以更改执行计划。本章解释了如何使用提示增强各种方法。
Generally a hint can be used to:
通常,提示可用于:
- Enforce planner: there’s no perfect planner, so it makes sense to implement hints to allow user better control the execution;
强制执行计划器:没有完美的计划器,因此实现提示以允许用户更好地控制执行是有意义的; - Append meta data(or statistics): some statistics like “table index for scan” and “skew info of some shuffle keys” are somewhat dynamic for the query, it would be very convenient to config them with hints because our planning metadata from the planner is very often not that accurate;
附加元数据(或统计信息):一些统计信息,如“用于扫描的表索引”和“一些shuffle键的倾斜信息”,对于查询来说是动态的,用提示配置它们会很方便,因为我们来自计划器的计划元数据通常不那么准确; - Operator re