Updated on 2024-08-20 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 enabled.

Example

prepare k as select /*+ choose_adaptive_gplan */ * from t1 where c1=$1 and c2=$2 and c3=$3 and c4=$4;