cdb_plan_cache
parameter to enable or disable the execution plan cache and the cdb_plan_cache_stats
parameter to query information about cache hits.Parameter | Status | Type | Default Value | Valid Values | Description |
cdb_plan_cache | yes | bool | false | true/false | Whether to enable the feature. Only accounts with the feature permission can use the parameter. |
cdb_plan_cache_stats
parameter, one can then view related data through the show cdb_plan_cache_stat
command.show cdb_plan_cache_stat
command to query information about execution plan cache hits. The command will return the following fields:Field | Description |
sql | A SQL statement with the question mark (?) which represents that the execution plan of this statement has been cached. |
mode | SQL cache mode. Currently, only the prepare mode is supported. |
hit | Number of hits for this session |
cdb_plan_cache_stats
switch is enabled, it essentially functions as an information record, which will have an impact on performance.
Was this page helpful?