Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Starting with MariaDB Server 10.5.0, the InnoDB adaptive hash index is disabled by default (MDEV-20487).
There are two counters btr_cur_n_non_sea and btr_cur_n_sea that can be used to determine the usefulness of the adaptive hash index. These counters are only exposed via SHOW ENGINE INNODB STATUS, via the section INSERT BUFFER AND ADAPTIVE HASH INDEX, which includes output like this:
const ulint with_ahi = btr_cur_n_sea, without_ahi = btr_cur_n_non_sea; |
fprintf(file, |
"%.2f hash searches/s, %.2f non-hash searches/s\n", |
static_cast<double>(with_ahi - btr_cur_n_sea_old) |
/ time_elapsed,
|
static_cast<double>(without_ahi - btr_cur_n_non_sea_old) |
/ time_elapsed);
|
btr_cur_n_sea_old = with_ahi;
|
btr_cur_n_non_sea_old = without_ahi;
|
It does not make any sense to update the counter btr_cur_n_non_sea when the adaptive hash index is disabled. As noted in MDEV-21212, such updates come with a cost.
However, removing the update is a user-visible change, because the above output would show something like the following even when the adaptive hash index is disabled:
0.00 hash searches/s, xxx.xx non-hash searches/s
|
Therefore, we cannot remove the counter update (or the message output) in any generally available release series.
Attachments
Issue Links
- relates to
-
MDEV-21212 buf_page_get_gen -> buf_pool->stat.n_page_gets++ is a cpu waste (0.5-1%)
- Closed
-
MDEV-25882 Statistics used to track b-tree (non-adaptive) searches should be updated only when adaptive hashing is turned-on
- Closed
-
MDEV-27734 Set innodb_change_buffering=none by default
- Closed