Skip to content

物化视图未生效 #31104

Closed Answered by BiteTheDDDDt
banyue0618 asked this question in Q&A
Feb 19, 2024 · 2 comments · 5 replies
Discussion options

You must be logged in to vote
create table dms_cargo_baseinfo (id int , cargocatg varchar(32), brandname varchar(32), cargoname varchar(32) ) distributed by hash(id) buckets 1 properties ("replication_num"="1");

CREATE MATERIALIZED VIEW dms_cargo_baseinfo_ts AS 
SELECT id,bitmap_union(bitmap_hash(cargocatg)), bitmap_union(bitmap_hash(brandname)), bitmap_union(bitmap_hash(cargoname)) 
FROM dms_cargo_baseinfo group by id;

insert into dms_cargo_baseinfo values (1, 'a', 'b', 'c');

explain
SELECT bitmap_count(bitmap_union(bitmap_hash(cargocatg))) AS cargocatg_count, bitmap_count(bitmap_union(bitmap_hash(brandname))) AS brandname_count, bitmap_count(bitmap_union(bitmap_hash(cargoname))) AS cargoname_count 
FROM dms_cargo…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@banyue0618
Comment options

@yagagagaga
Comment options

@banyue0618
Comment options

Comment options

You must be logged in to vote
2 replies
@banyue0618
Comment options

@BiteTheDDDDt
Comment options

Answer selected by BiteTheDDDDt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants