为了更快的定位您的问题,请提供以下信息,谢谢
【详述】查询没有过bloom filter索引
【背景】
建表语句和建立索引语句
CREATE TABLE delivery_info_s (
`id` varchar(1000) not NUll default(uuid()),
`delivery_no` varchar(65533) NOT NULL COMMENT "",
`sid` varchar(1000) DEFAULT "",
`create_date` DATE,
`receive_id` VARCHAR(1000),
`brand_id` INT,
`brand_name` VARCHAR(1000) DEFAULT "",
`eid` INT,
`delivery_type` varchar(20) NOT NULL COMMENT "",
`ename` VARCHAR(200) DEFAULT "",
`is_person_post` BOOLEAN,
`create_time` DATETIME,
`receiver_date` DATE,
`descrition_type` varchar(1000) DEFAULT "",
`description` varchar(5000) DEFAULT "",
`weight` FLOAT,
`customer_name` varchar(1000) DEFAULT "",
`customer_phone` varchar(1000) DEFAULT "",
`card_type` varchar(1000) DEFAULT "",
`sex` VARCHAR(1000) DEFAULT "",
`nationality` VARCHAR(1000) DEFAULT "",
`card_address` VARCHAR(1048576) DEFAULT "",
`address` VARCHAR(1048576) DEFAULT "",
`area_code` VARCHAR(100) DEFAULT "",
`province` VARCHAR(1000) DEFAULT "",
`city` VARCHAR(1000) DEFAULT "",
`district` VARCHAR(1000) DEFAULT "",
`reg_barea` VARCHAR(1000) DEFAULT "",
`branch_code` VARCHAR(1000) DEFAULT "",
`bname` VARCHAR(1000) DEFAULT "",
`company_code` VARCHAR(1000) DEFAULT "",
`cname` VARCHAR(1000) DEFAULT "",
`p_name` VARCHAR(1000) DEFAULT "",
`p_sid` VARCHAR(100) DEFAULT "",
`p_phone` VARCHAR(100) DEFAULT "",
`customer_code` VARCHAR(10000) DEFAULT "",
`cutomer_company` VARCHAR(10000) DEFAULT "",
`customer_unit_code` VARCHAR(1000) DEFAULT "",
`receiver_name` VARCHAR(1000) DEFAULT "",
`receiver_phone` VARCHAR(100) DEFAULT "",
`receiver_address` VARCHAR(1048576) DEFAULT "",
`receiver_area_code` VARCHAR(100) DEFAULT "",
`receiver_province` VARCHAR(1000) DEFAULT "",
`receiver_city` VARCHAR(1000) DEFAULT "",
`receiver_district` VARCHAR(1000) DEFAULT "",
`receiver_reg_barea` VARCHAR(1000) DEFAULT "",
`lng` FLOAT,
`lat` FLOAT,
`receiver_lng` FLOAT,
`receiver_lat` FLOAT,
`company_id` VARCHAR(1000),
`branch_id` VARCHAR(1000),
`remark` VARCHAR(1048576)
) ENGINE=OLAP
PRIMARY KEY( id, delivery_no, sid,create_date)
PARTITION BY RANGE ( create_date )
(
PARTITION delivery_info_s_201812 VALUES LESS THAN ( "2019-01-01" ),
PARTITION delivery_info_s_201901 VALUES LESS THAN ( "2019-02-01" ),
PARTITION delivery_info_s_201902 VALUES LESS THAN ( "2019-03-01" ),
PARTITION delivery_info_s_201903 VALUES LESS THAN ( "2019-04-01" ),
PARTITION delivery_info_s_201904 VALUES LESS THAN ( "2019-05-01" ),
PARTITION delivery_info_s_201905 VALUES LESS THAN ( "2019-06-01" ),
PARTITION delivery_info_s_201906 VALUES LESS THAN ( "2019-07-01" ),
PARTITION delivery_info_s_201907 VALUES LESS THAN ( "2019-08-01" ),
PARTITION delivery_info_s_201908 VALUES LESS THAN ( "2019-09-01" ),
PARTITION delivery_info_s_201909 VALUES LESS THAN ( "2019-10-01" ),
PARTITION delivery_info_s_201910 VALUES LESS THAN ( "2019-11-01" ),
PARTITION delivery_info_s_201911 VALUES LESS THAN ( "2019-12-01" ),
PARTITION delivery_info_s_201912 VALUES LESS THAN ( "2020-01-01" ),
PARTITION delivery_info_s_202001 VALUES LESS THAN ( "2020-02-01" ),
PARTITION delivery_info_s_202002 VALUES LESS THAN ( "2020-03-01" ),
PARTITION delivery_info_s_202003 VALUES LESS THAN ( "2020-04-01" ),
PARTITION delivery_info_s_202004 VALUES LESS THAN ( "2020-05-01" ),
PARTITION delivery_info_s_202005 VALUES LESS THAN ( "2020-06-01" ),
PARTITION delivery_info_s_202006 VALUES LESS THAN ( "2020-07-01" ),
PARTITION delivery_info_s_202007 VALUES LESS THAN ( "2020-08-01" ),
PARTITION delivery_info_s_202008 VALUES LESS THAN ( "2020-09-01" ),
PARTITION delivery_info_s_202009 VALUES LESS THAN ( "2020-10-01" ),
PARTITION delivery_info_s_202010 VALUES LESS THAN ( "2020-11-01" ),
PARTITION delivery_info_s_202011 VALUES LESS THAN ( "2020-12-01" ),
PARTITION delivery_info_s_202012 VALUES LESS THAN ( "2021-01-01" ),
PARTITION delivery_info_s_202101 VALUES LESS THAN ( "2021-02-01" ),
PARTITION delivery_info_s_202102 VALUES LESS THAN ( "2021-03-01" ),
PARTITION delivery_info_s_202103 VALUES LESS THAN ( "2021-04-01" ),
PARTITION delivery_info_s_202104 VALUES LESS THAN ( "2021-05-01" ),
PARTITION delivery_info_s_202105 VALUES LESS THAN ( "2021-06-01" ),
PARTITION delivery_info_s_202106 VALUES LESS THAN ( "2021-07-01" ),
PARTITION delivery_info_s_202107 VALUES LESS THAN ( "2021-08-01" ),
PARTITION delivery_info_s_202108 VALUES LESS THAN ( "2021-09-01" ),
PARTITION delivery_info_s_202109 VALUES LESS THAN ( "2021-10-01" ),
PARTITION delivery_info_s_202110 VALUES LESS THAN ( "2021-11-01" ),
PARTITION delivery_info_s_202111 VALUES LESS THAN ( "2021-12-01" ),
PARTITION delivery_info_s_202112 VALUES LESS THAN ( "2022-01-01" ),
PARTITION delivery_info_s_202201 VALUES LESS THAN ( "2022-02-01" ),
PARTITION delivery_info_s_202202 VALUES LESS THAN ( "2022-03-01" ),
PARTITION delivery_info_s_202203 VALUES LESS THAN ( "2022-04-01" ),
PARTITION delivery_info_s_202204 VALUES LESS THAN ( "2022-05-01" ),
PARTITION delivery_info_s_202205 VALUES LESS THAN ( "2022-06-01" ),
PARTITION delivery_info_s_202206 VALUES LESS THAN ( "2022-07-01" ),
PARTITION delivery_info_s_202207 VALUES LESS THAN ( "2022-08-01" ),
PARTITION delivery_info_s_202208 VALUES LESS THAN ( "2022-09-01" ),
PARTITION delivery_info_s_202209 VALUES LESS THAN ( "2022-10-01" ),
PARTITION delivery_info_s_202210 VALUES LESS THAN ( "2022-11-01" ),
PARTITION delivery_info_s_202211 VALUES LESS THAN ( "2022-12-01" ),
PARTITION delivery_info_s_202212 VALUES LESS THAN ( "2023-01-01" ),
PARTITION delivery_info_s_202301 VALUES LESS THAN ( "2023-02-01" ),
PARTITION delivery_info_s_202302 VALUES LESS THAN ( "2023-03-01" ),
PARTITION delivery_info_s_202303 VALUES LESS THAN ( "2023-04-01" ),
PARTITION delivery_info_s_202304 VALUES LESS THAN ( "2023-05-01" ),
PARTITION delivery_info_s_202305 VALUES LESS THAN ( "2023-06-01" ),
PARTITION delivery_info_s_202306 VALUES LESS THAN ( "2023-07-01" ),
PARTITION delivery_info_s_202307 VALUES LESS THAN ( "2023-08-01" ),
PARTITION delivery_info_s_202308 VALUES LESS THAN ( "2023-09-01" ),
PARTITION delivery_info_s_202309 VALUES LESS THAN ( "2023-10-01" ),
PARTITION delivery_info_s_202310 VALUES LESS THAN ( "2023-11-01" ),
PARTITION delivery_info_s_202311 VALUES LESS THAN ( "2023-12-01" ),
PARTITION delivery_info_s_202312 VALUES LESS THAN ( "2024-01-01" ),
PARTITION delivery_info_s_202401 VALUES LESS THAN ( "2024-02-01" ),
PARTITION delivery_info_s_202402 VALUES LESS THAN ( "2024-03-01" )
) DISTRIBUTED BY HASH ( id, delivery_no, sid ) BUCKETS 30 PROPERTIES (
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "MONTH",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "delivery_info_s_",
"replication_num" = "2"
);
ALTER TABLE delivery_info_s SET (“bloom_filter_columns” =“delivery_no,sid,customer_phone,receiver_phone”);
【业务影响】按delivery_no查询时间不一样,从几秒到几十秒不等
【是否存算分离】否
【StarRocks版本】例如:1.18.2
【集群规模】例如:4fe(1 follower+4observer)+4be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:64C/128G/万兆
【联系方式】601331193@qq.com
【附件】
- fe.log/beINFO/相应截图ANALYZE PROFILE FROM '01ee9af5-b.txt (10.0 KB)
- 慢查询:
- Profile信息,获取Profile,通过Profile分析查询瓶颈
- 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
- pipeline是否开启:show variables like ‘%pipeline%’;