mirror of
https://github.com/MariaDB/server.git
synced 2025-10-17 13:12:14 +02:00
![]() The linear read-ahead, which is enabled by default by a nonzero default value of innodb_read_ahead_threshold=56, only works if index leaf pages or undo log pages have been allocated on adjacent page numbers. That is not always the case. After this change, the exact nonzero values of innodb_read_ahead_threshold matter only for the read-ahead of undo log pages. For the read-ahead of B-tree leaf pages when starting a read from an index, it only matters if innodb_read_ahead_threshold=0. buf_read_ahead_undo(): Renamed from buf_read_ahead_linear(). This function will no longer be invoked on any BLOB pages (for which FIL_PAGE_PREV and FIL_PAGE_NEXT were not initialized consistently) nor on any index pages. For index leaf pages, we will introduce buf_read_ahead_one() and buf_read_ahead_pages(). btr_cur_t::search_leaf(), btr_cur_t::open_leaf(): Implement read-ahead for up to 16 leaf-level B-tree pages. This logic is enabled by a nonzero value of innodb_read_ahead_threshold; the actual value will not matter here. buf_read_ahead_update(), buf_read_ahead_update_sql(): Some common code for updating counters. buf_read_ahead_one(): Read ahead one (sibling leaf) page. This logic cannot be disabled. buf_read_ahead_pages(): Read ahead B-tree index leaf pages. buf_read_ahead_random(): Split the function into two parts: one that determines which range of pages should be read, and another that actually initiates a read of the pages. buf_read_page_low(): Remove a bogus comment. btr_pcur_move_to_next_page(): Invoke buf_read_ahead_one() instead of buf_read_ahead_linear(). btr_pcur_move_backward_from_page(): Implement a fast path of trying to acquire a latch on the previous page without waiting, and invoke buf_read_ahead_one() on the preceding page, with the assumption that we may be accessing that page in the near future. btr_copy_blob_prefix(): Simplify the logic. On other than ROW_FORMAT=COMPRESSED BLOB pages, the FIL_PAGE_NEXT field is not meaningfully initialized. The FIL_PAGE_PREV field is not pointing to anything meaningful either. buf_read_ahead_linear() expects these to be set meaningfully. Only the non-default setting innodb_random_read_ahead=ON might be meaningful here. |
||
---|---|---|
.. | ||
archive | ||
blackhole | ||
columnstore | ||
connect | ||
csv | ||
example | ||
federated | ||
federatedx | ||
heap | ||
innobase | ||
maria | ||
mroonga | ||
myisam | ||
myisammrg | ||
oqgraph | ||
perfschema | ||
rocksdb | ||
sequence | ||
sphinx | ||
spider | ||
test_sql_discovery |