云数据库 GaussDB-SNAPSHOT:示例

时间:2023-11-01 16:22:03

示例

create snapshot s1@1.0 comment is 'first version' as select * from t1;
create snapshot s1@3.0 from @1.0 comment is 'inherits from @1.0' using (INSERT VALUES(6, 'john'), (7, 'tim'); DELETE WHERE id = 1);
SELECT * FROM s1@1.0;
purge snapshot s1@1.0;
sample snapshot s1@2.0 stratify by name as nick at ratio .5;
publish snapshot s1@2.0;
archive snapshot s1@2.0;
support.huaweicloud.com/centralized-devg-v2-opengauss/devg_03_0667.html