Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 使用/+ MEMORY_QUOTA(2 GB)/只能放在最外层select吗?有没有什么替代方案?
[TiDB Usage Environment] Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the problem occurred
[Encountered Problem: Problem Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachment: Screenshot/Log/Monitoring]
As shown in the picture, it works outside but not inside. Is there any solution?
Shouldn’t this be placed at the outermost layer?
You can consider modifying the system variable tidb_mem_quota_query.
TiDB currently supports two types of Optimizer Hints based on their scope of effect: the first type is effective within the query block scope, such as /*+ HASH_AGG() */
; the second type is effective within the entire query scope, such as /*+ MEMORY_QUOTA(1024 MB)*/
.
For hints effective within the query block scope, refer to: Optimizer Hints | PingCAP Documentation Center
This hint can only be placed outside.
Specify the block with sel
?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.