1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Return >= 1 from matching_candidates_in_table if records > 0.0

Having rows >= 1.0 helps ensure that when we calculate total rows of joins
the number of resulting rows will not be less after the join.

Changes in test cases:
- Join order change for some tables with few records
- 'Filtered' is much higher for tables with few rows, as 1 row is a high
  procent of a table with few rows.
This commit is contained in:
Monty
2021-10-08 01:40:59 +03:00
committed by Sergei Petrunia
parent b67144893a
commit bc9805e954
14 changed files with 50 additions and 39 deletions

View File

@ -160,16 +160,16 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
},
{
"access_type": "index_merge",
"resulting_rows": 0.6,
"cost": 2.172957403,
"resulting_rows": 1,
"cost": 2.092957403,
"chosen": true
}
],
"chosen_access_method":
{
"type": "index_merge",
"records": 0.6,
"cost": 2.172957403,
"records": 1,
"cost": 2.092957403,
"uses_join_buffering": false
}
}
@ -180,7 +180,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"plan_prefix":
[],
"table": "t1",
"rows_for_plan": 0.6,
"rows_for_plan": 1,
"cost_for_plan": 2.292957403
}
]