Hi Katte:
I think you got mistake,

your rollup in second test is
ALTER TABLE tb06 ADD ROLLUP rollup_key9_1(prod, region, brand, value_2) from 
rollup_key9;
which contains columns (prod, region, brand, value_2)
But your query is related to columns (prod, region, channel, value_2). The 
column `channel` is not included in your rollup,
so your query does not hit the rollup.


--
此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmin...@apache.org



在 2019-09-24 14:18:16,"Zhao Chun" <zh...@apache.org> 写道:
>Hi Katte
>
>
>Katte <liu.z...@ccfan.com.cn> 于2019年9月24日周二 下午1:56写道:
>
>> Hi All,
>>
>> I have 100 millions data is stored in Doris. I testing rullup performance
>> as the following:
>>
>> The fist test is was normal and performace improved a lot after created
>> rollup.
>> ------------------------------------------------------
>> # no create rollup --- costs 4.73 sec
>> SELECT key1, key2, SUM(value_10) FROM tb06 group by key1, key2;
>>
>> # add rollup
>> ALTER TABLE tb06 ADD ROLLUP rollup_key7(key1, key2, value_10);
>>
>> # after created rollup --- 0.02 sec
>> SELECT key1, key2, SUM(value_10) FROM tb06 group by key1, key2; 0.02
>> ------------------------------------------------------
>>
>> But the second test found no significant improverment in performance after
>> created rollup.
>> ------------------------------------------------------
>> # no create rollup --- costs 21.75 sec
>> SELECT prod, region, channel, SUM(value_2) FROM tb06 group by prod,
>> region, channel;
>> # add rollup
>> ALTER TABLE tb06 ADD ROLLUP rollup_key9_1(prod, region, brand, value_2)
>> from rollup_key9;
>> # after created rollup --- 20.97 sec
>> SELECT prod, region, channel, SUM(value_2) FROM tb06 group by prod,
>> region, channel;
>>
>> 1. you should make sure that this query is through the rollup
>2. What is the size of the base table and the rollup table? Is the rollup
>table smaller than the base table?
>3. Is there other key column other than "prod, region, channel"
>4. You can set is_report_sucess = true, and execute the query again, and
>get the query profile in Doris Frontend's webserver.
>
>
>> I want to know if this test is normal, and rollup does not work very well
>> when there is a large amount of data and more number of keys grouped
>> together.
>>
>>
>>
>>
>>
>>
>> 发送自 Windows 10 版邮件应用
>>
>>

Reply via email to