reduce performance time

This commit is contained in:
JackyWoo 2023-08-02 18:10:01 +08:00
parent 162c674d74
commit 1c930f34de
2 changed files with 5 additions and 5 deletions

View File

@ -110,7 +110,7 @@ public:
using Base = InDepthQueryTreeVisitorWithContext<UniqToCountVisitor>;
using Base::Base;
void visitImpl(QueryTreeNodePtr & node)
void enterImpl(QueryTreeNodePtr & node)
{
if (!getSettings().optimize_uniq_to_count)
return;

View File

@ -1,8 +1,8 @@
<test>
<query>select uniq(number) from (select DISTINCT number from numbers(100000000)) SETTINGS optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select number from numbers(100000000) group by number) SETTINGS optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select DISTINCT number from numbers(1000000)) SETTINGS optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select number from numbers(1000000) group by number) SETTINGS optimize_uniq_to_count=1</query>
<!--For new analyzer-->
<query>select uniq(number) from (select DISTINCT number from numbers(100000000)) SETTINGS allow_experimental_analyzer=1, optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select number from numbers(100000000) group by number) SETTINGS allow_experimental_analyzer=1, optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select DISTINCT number from numbers(1000000)) SETTINGS allow_experimental_analyzer=1, optimize_uniq_to_count=1</query>
<query>select uniq(number) from (select number from numbers(1000000) group by number) SETTINGS allow_experimental_analyzer=1, optimize_uniq_to_count=1</query>
</test>