diff options
author | Monty <monty@mariadb.org> | 2020-03-24 13:34:03 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-03-26 16:07:10 +0200 |
commit | 8e22ca898f4ecf5807eef9cf1eab6b4c0d8dcc94 (patch) | |
tree | d56bb0a53fcdbcfb1153cfc33d4b0de1f2f2be99 /sql/sql_const.h | |
parent | cdf064e1872583334b32b575ef1cb43b2b8b567b (diff) | |
download | mariadb-git-bb-10.5-monty-opt.tar.gz |
More cost fixes:bb-10.5-monty-opt
- heap::read_time() and heap::keyread_time() adjusted to not add +1.
This was to ensure that handler::keyread_time() doesn't give
higher cost for heap tables than for normal tables. One effect of
this is that heap and derived tables stored in heap will prefer
key access as this is now regarded as cheap.
- Changed cost for index read in sql_select.cc to match
multi_range_read_info_const(). All index cost calculation is now
done trough one function.
- 'ref' will now use quick_cost for keys if it exists. This is done
so that for '=' ranges, 'ref' is prefered over 'range'.
- scan_time() now takes avg_io_costs() into account
- get_delayed_table_estimates() uses block_size and avg_io_cost()
- Removed default argument to test_if_order_by_key(); simplifies code
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r-- | sql/sql_const.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h index c605f3d0bae..3f053a1606d 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -204,8 +204,8 @@ instead of reading with keys. The number says how many evaluation of the WHERE clause is comparable to reading one extra row from a table. */ -#define TIME_FOR_COMPARE 5 // 5 compares == one read -#define TIME_FOR_COMPARE_IDX 20 +#define TIME_FOR_COMPARE 5.0 // 5 WHERE compares == one read +#define TIME_FOR_COMPARE_IDX 20.0 #define IDX_BLOCK_COPY_COST ((double) 1 / TIME_FOR_COMPARE) #define IDX_LOOKUP_COST ((double) 1 / 8) |