mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
rename v2
This commit is contained in:
parent
f18debb108
commit
ab86ca2fb6
@ -411,7 +411,7 @@ struct Settings : public SettingsCollection<Settings>
|
|||||||
M(SettingBool, enable_scalar_subquery_optimization, true, "If it is set to true, prevent scalar subqueries from (de)serializing large scalar values and possibly avoid running the same subquery more than once.", 0) \
|
M(SettingBool, enable_scalar_subquery_optimization, true, "If it is set to true, prevent scalar subqueries from (de)serializing large scalar values and possibly avoid running the same subquery more than once.", 0) \
|
||||||
M(SettingBool, optimize_trivial_count_query, true, "Process trivial 'SELECT count() FROM table' query from metadata.", 0) \
|
M(SettingBool, optimize_trivial_count_query, true, "Process trivial 'SELECT count() FROM table' query from metadata.", 0) \
|
||||||
M(SettingUInt64, mutations_sync, 0, "Wait for synchronous execution of ALTER TABLE UPDATE/DELETE queries (mutations). 0 - execute asynchronously. 1 - wait current server. 2 - wait all replicas if they exist.", 0) \
|
M(SettingUInt64, mutations_sync, 0, "Wait for synchronous execution of ALTER TABLE UPDATE/DELETE queries (mutations). 0 - execute asynchronously. 1 - wait current server. 2 - wait all replicas if they exist.", 0) \
|
||||||
M(SettingBool, optimize_ast_arithmetic, true, "Optimize arithmetic operations at AST layer: rewrite operations with faster ones if possible.", 0) \
|
M(SettingBool, optimize_arithmetic_operations_in_aggregate_functions, true, "Move arithmetic operations out of aggregation functions", 0) \
|
||||||
M(SettingBool, optimize_if_chain_to_miltiif, false, "Replace if(cond1, then1, if(cond2, ...)) chains to multiIf. Currently it's not beneficial for numeric types.", 0) \
|
M(SettingBool, optimize_if_chain_to_miltiif, false, "Replace if(cond1, then1, if(cond2, ...)) chains to multiIf. Currently it's not beneficial for numeric types.", 0) \
|
||||||
M(SettingBool, allow_experimental_alter_materialized_view_structure, false, "Allow atomic alter on Materialized views. Work in progress.", 0) \
|
M(SettingBool, allow_experimental_alter_materialized_view_structure, false, "Allow atomic alter on Materialized views. Work in progress.", 0) \
|
||||||
M(SettingBool, enable_early_constant_folding, true, "Enable query optimization where we analyze function and subqueries results and rewrite query if there're constants there", 0) \
|
M(SettingBool, enable_early_constant_folding, true, "Enable query optimization where we analyze function and subqueries results and rewrite query if there're constants there", 0) \
|
||||||
|
@ -823,7 +823,7 @@ SyntaxAnalyzerResultPtr SyntaxAnalyzer::analyzeSelect(
|
|||||||
optimizeIf(query, result.aliases, settings.optimize_if_chain_to_miltiif);
|
optimizeIf(query, result.aliases, settings.optimize_if_chain_to_miltiif);
|
||||||
|
|
||||||
/// Move arithmetic operations out of aggregation functions
|
/// Move arithmetic operations out of aggregation functions
|
||||||
optimizeArithmeticOperationsInAgr(query, settings.optimize_ast_arithmetic);
|
optimizeArithmeticOperationsInAgr(query, settings.optimize_arithmetic_operations_in_aggregate_functions);
|
||||||
|
|
||||||
/// Push the predicate expression down to the subqueries.
|
/// Push the predicate expression down to the subqueries.
|
||||||
result.rewrite_subqueries = PredicateExpressionsOptimizer(context, tables_with_column_names, settings).optimize(*select_query);
|
result.rewrite_subqueries = PredicateExpressionsOptimizer(context, tables_with_column_names, settings).optimize(*select_query);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
set optimize_ast_arithmetic = 1;
|
set optimize_arithmetic_operations_in_aggregate_functions = 1;
|
||||||
|
|
||||||
SELECT sum(number * -3) + min(2 * number * -3) - max(-1 * -2 * number * -3) FROM numbers(10000000);
|
SELECT sum(number * -3) + min(2 * number * -3) - max(-1 * -2 * number * -3) FROM numbers(10000000);
|
||||||
SELECT max(log(2) * number) FROM numbers(10000000);
|
SELECT max(log(2) * number) FROM numbers(10000000);
|
||||||
SELECT round(max(log(2) * 3 * sin(0.3) * number * 4)) FROM numbers(10000000);
|
SELECT round(max(log(2) * 3 * sin(0.3) * number * 4)) FROM numbers(10000000);
|
||||||
|
|
||||||
set optimize_ast_arithmetic = 0;
|
set optimize_arithmetic_operations_in_aggregate_functions = 0;
|
||||||
|
|
||||||
SELECT sum(number * -3) + min(2 * number * -3) - max(-1 * -2 * number * -3) FROM numbers(10000000);
|
SELECT sum(number * -3) + min(2 * number * -3) - max(-1 * -2 * number * -3) FROM numbers(10000000);
|
||||||
SELECT max(log(2) * number) FROM numbers(10000000);
|
SELECT max(log(2) * number) FROM numbers(10000000);
|
||||||
|
Loading…
Reference in New Issue
Block a user