云数据库 GAUSSDB-指定不使用全局计划缓存的Hint:示例

时间:2024-11-02 18:45:25

示例

gaussdb=#  deallocate all;
DEALLOCATE ALL
gaussdb=#  prepare p1 as insert /*+ no_gpc*/ into t1 select c1,c2 from t2 where c1=$1;
PREPARE
gaussdb=#  execute p1(3);
INSERT 0 1
gaussdb=#  select * from dbe_perf.global_plancache_status where schema_name='public' order by 1,2;
 nodename | query | refcount | valid | databaseid | schema_name | params_num | func_id | pkg_id | stmt_id 
----------+-------+----------+-------+------------+-------------+------------+---------+--------+---------
(0 rows)

dbe_perf.global_plancache_status视图中无结果即没有计划被全局缓存。

support.huaweicloud.com/centralized-devg-v8-gaussdb/gaussdb-42-0294.html