暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

GBase 8a V95版本表级、列级压缩案例

努力的贾维斯 2022-06-07
512

引言

在Gbase 8aV86版本中,有压缩比概念,常说到55压缩、13压缩这样的概念,但是在Gbase 8a V95版本中如下概念

  • NoZip 无压缩
  • HighZ 高压缩比
  • RapidZ 快速压缩
  • STDZ 标准压缩

在实际使用如下

  • Compress(’NoZip‘,0)=compress(0,0)
  • Compress(’HighZ’,0‘)=compress(1,3)
  • Compress(’RapidZ‘,0‘)=compress(5,5)
  • Compress(’STDZ’,0‘)=compress(’STDZ‘,3)

使用样例

表级压缩

gbase> create table t6(id int) compress('STDZ',9);
Query OK, 0 rows affected (Elapsed: 00:00:00.13)

gbase> show create table t6;
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                           |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| t6    | CREATE TABLE "t6" (
  "id" int(11) DEFAULT NULL
) COMPRESS('STDZ', 9)  ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (Elapsed: 00:00:00.00)

列级压缩

gbase> create table t5(id int compress('STDZ',9));
Query OK, 0 rows affected (Elapsed: 00:00:00.11)

gbase> show create table t5;
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                           |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| t5    | CREATE TABLE "t5" (
  "id" int(11) DEFAULT NULL COMPRESS('STDZ', 9)
) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (Elapsed: 00:00:00.00)
最后修改时间:2022-06-07 16:40:06
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论