-
Notifications
You must be signed in to change notification settings - Fork 699
Added another cost based optimization level #8348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added another cost based optimization level #8348
Conversation
⚪ ⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
@@ -148,7 +148,7 @@ bool TKqpProviderContext::IsJoinApplicable(const std::shared_ptr<IBaseOptimizerN | |||
|
|||
switch( joinAlgo ) { | |||
case EJoinAlgoType::LookupJoin: | |||
if ((OptLevel >= 2) && (left->Stats->Nrows > 1000)) { | |||
if ((OptLevel != 3) && (left->Stats->Nrows > 1000)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
почему не равно? для 2 и 4 будет false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, так правильно сейчас
Уровень 3 - специальный, он форсирует lookup joins всегда, если они в принципе возможны. На других уровнях проверяем условие Nrows
Кстати с новыми кост функциями эта проверка на 1000 записей уйдет
Changelog entry
Новая логика уровней оптимизаций:
0 - CBO выключен
1 - CBO не включается, но считаются предсказания оптимизатора
2 - CBO включается в полном виде только для запросов, где есть OLAP таблицы
3 - CBO включается для всех запросов, но для даташардов предпочитает lookup join.
4 - CBO включен в полном виде всегда
Changelog category
Additional information
...