bitmap类型字段占用空间过大

Viewed 42

版本:2.0.12

表模型agg,第2张表有1个bitmap类型字段(其它字段和第1张表都一样),通过show data命令发现表2大小比表1多出近180G,这个是正常的吗?

image.png

CREATE TABLE `xxx1` (
  `pt` date ,
  `code` VARCHAR(30),
  `order_id` BIGINT,
  `idea_id` BIGINT,
  `hour` TINYINT,
  `use_area` TINYINT,
  `order_source` VARCHAR(50),
  `play_dur` BIGINT SUM  DEFAULT "0",
  `play_cnt` BIGINT SUM DEFAULT "0",
  `click_cnt` BIGINT SUM DEFAULT "0"
) ENGINE = OLAP 
AGGREGATE KEY(`pt`,`code`,`order_id`,`idea_id`,`hour`,`use_area`,`order_source`) 
PARTITION BY RANGE(`pt`)()
DISTRIBUTED BY HASH(`order_id`, `code`) BUCKETS 8 xxx;

数据量
1723428984233.jpg

CREATE TABLE `xxx2` (
  `pt` date ,
  `code` VARCHAR(30),
  `order_id` BIGINT,
  `idea_id` BIGINT,
  `hour` TINYINT,
  `use_area` TINYINT,
  `order_source` VARCHAR(50),
  `point_id` BITMAP BITMAP_UNION,
  `play_dur` BIGINT SUM  DEFAULT "0",
  `play_cnt` BIGINT SUM DEFAULT "0",
  `click_cnt` BIGINT SUM DEFAULT "0"
) ENGINE = OLAP 
AGGREGATE KEY(`pt`,`code`,`order_id`,`idea_id`,`hour`,`use_area`,`order_source`) 
PARTITION BY RANGE(`pt`)()
DISTRIBUTED BY HASH(`order_id`) BUCKETS 16 xxx;

数据量
1723429032203.jpg

1 Answers
  1. 可以提供一下两张表的创建语句
  2. 分别select count(*) 看看两张表的数据量,表的副本数是否一样