1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20109: Optimizer ignores distinct key created for materialized...

(Backported to 10.3, addressed review input)

Sj_materialization_picker::check_qep(): fix error in cost/fanout
calculations:
- for each join prefix, add #prefix_rows / TIME_FOR_COMPARE to the cost,
  like best_extension_by_limited_search does
- Remove the fanout produced by the subquery tables.
- Also take into account join condition selectivity

optimize_wo_join_buffering() (used by LooseScan and FirstMatch)
- also add #prefix_rows / TIME_FOR_COMPARE to the cost of each prefix.
- Also take into account join condition selectivity
This commit is contained in:
Sergei Petrunia
2019-08-29 15:37:49 +03:00
parent d58437d195
commit ef76f81c98
27 changed files with 392 additions and 295 deletions

View File

@ -5870,7 +5870,10 @@ public:
uint tables; /* Number of tables in the sj-nest */
/* Expected #rows in the materialized table */
/* Number of rows in the materialized table, before the de-duplication */
double rows_with_duplicates;
/* Expected #rows in the materialized table, after de-duplication */
double rows;
/*