Help Center/ GaussDB/ Developer Guide(Centralized_V2.0-3.x)/ SQL Optimization/ Hint-based Tuning/ Hint for Adaptive Plan Selection
Updated on 2025-08-19 GMT+08:00
Hint for Adaptive Plan Selection
Description
For query statements and DML statements executed in PBE mode, you can add the choose_adaptive_gplan hint to the query to trigger adaptive plan selection.
Syntax
Enable adaptive plan selection for query:
1 | choose_adaptive_gplan
|
- For SQL statements that are executed in non-PBE mode, setting this hint does not affect the execution mode.
- This hint takes effect only when the GUC parameter enable_cachedplan_mgr is set to on.
Examples
prepare k as select /*+ choose_adaptive_gplan */ * from t1 where c1=$1 and c2=$2 and c3=$3 and c4=$4;
Parent topic: Hint-based Tuning
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.