Help Center/ GaussDB(DWS)/ Troubleshooting/ Database Use/ Execution Plan Scan Hints Do Not Take Effect

Execution Plan Scan Hints Do Not Take Effect

Updated on 2024-03-08 GMT+08:00

Symptom

The execution plan scan hints are specified in GaussDB(DWS) but do not take effect.

Possible Causes

The hint syntax is incorrect. The scan hint syntax should contain /*+ indexscan(table_name index_name) */. In the picture, the plus sign (+) is missing.

For details about the syntax of plan hints, see Plan Hint Optimization Overview.

Handling Procedure

  1. Add the /*+ indexscan(table_name index_name) */ format to the SELECT statement for the scan hint syntax.

    explain verbose
    select /*+ indexscan (vmall_oar.dm_page_lag_lead_result idx_mix)*/
    ......

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback