1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00
Files
mariadb/storage/heap
Monty cd03bf5c53 Fixed costs in JOIN_TAB::estimate_scan_time() and HEAP
MDEV-35958 Cost estimates for materialized derived tables are poor

(Backport 11.8->11.4, the same patch)

Estimate_scan_time() calculates the cost of scanning a derivied table.
The old code did not take into account that the temporary table heap table
may be converted to Aria.

Things fixed:
- Added checking if the temporary tables data will fit in the heap.
  If not, then calculate the cost based on the designated internal
  temporary table engine (Aria).
- Removed MY_MAX(records, 1000) and instead trust the optimizer's
  estimate of records. This reduces the cost of temporary tables a bit
  for small tables, which caused a few changes in mtr results.
- Fixed cost calculation for HEAP.
  - HEAP costs->row_next_find_cost was not set. This does not affect old
    costs calculation as this cost slot was not used anywhere.
    Now HEAP cost->row_next_find_cost is set, which allowed me to remove
    some duplicated computation in ha_heap::scan_time()

Reviewed by: Sergei Petrunia <sergey@mariadb.com>
2025-02-10 15:59:28 +02:00
..
2019-11-06 08:17:03 +02:00
2019-05-11 21:29:06 +03:00
2020-12-16 08:07:04 +11:00
2019-05-14 17:18:46 +03:00
2019-05-14 17:18:46 +03:00
2019-05-11 21:29:06 +03:00
2019-05-11 21:29:06 +03:00
2019-05-11 21:29:06 +03:00
2019-05-11 22:19:05 +03:00
2019-05-11 21:29:06 +03:00
2019-05-11 22:19:05 +03:00
2019-05-11 21:29:06 +03:00
2019-05-11 22:19:05 +03:00