返回首页

gbase数据、南大通用产品文档:GBase8a

更新日期:2024年09月11日

GBA-02IS-0007
错误码
错误标识
错误信息
GBA-02IS-0007
ER_NON_INSERTABLE_T
ABLE
The
target
table
%-.100s
of
the %s is not insertable-into
错误出现原因
不允许向视图中插入数据
分析与建议
目前集群不允许向视图中做插入、更新等更新数据的操作。

(SQL 管理 API)
随同 admin() 或 task() 函数,使用 ha set idxauto 参数来控制是否自动地将索引复制
到辅助服务器。
语法

GBase 8s 管理员参考
南大通用数据技术股份有限公司 - 741 -


用法
在已建立的主服务器上运行这个函数来启用或禁用向辅助服务器的自动索引复制。
您可在任何类型的主服务器上运行这个函数。
这个函数等同于 onmode -d idxauto 命令。
示例
下列示例启用自动的索引复制:
EXECUTE FUNCTION task("ha set idxauto on");

问题现象
CTE(common table expression)语法支持。
解决方法
针对同一个FROM 子查询在SQL 中出现多次的情况,在创建计划的时候,只对
其中一个子查询创建计划,并将结果放到临时表中,其它的子查询直接使用临时
表。
打开_t_gcluster_support_cte 参数,集群支持with as 语句。
with customer_total_return as
(select sr_customer_sk as ctr_customer_sk,
sr_store_sk as ctr_store_sk,
sum(SR_STORE_CREDIT) as ctr_total_return
from store_returns, date_dim
where sr_returned_date_sk = d_date_sk
and d_year = 2000
group by sr_customer_sk, sr_store_sk)
select c_customer_id
from customer_total_return ctr1, store, customer
where ctr1.ctr_total_return >
(select avg(ctr_total_return) * 1.2
from customer_total_return ctr2
where ctr1.ctr_store_sk = ctr2.ctr_store_sk)
and s_store_sk = ctr1.ctr_store_sk
and s_state = 'MI'
and ctr1.ctr_customer_sk = c_customer_sk
order by c_customer_id limit 100;

GBase 8a MPP Cluster 最佳实践
5 FAQ
文档版本(2022-02-11)
南大通用数据技术股份有限公司
120