mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-18144: ANALYZE for statement support for PK filters
ANALYZE and ANALYZE FORMAT=JSON structures are changed in the way that they show additional information when rowid filter is used: - r_selectivity_pct - the observed filter selectivity - r_buffer_size - the size of the rowid filter container buffer - r_filling_time_ms - how long it took to fill rowid filter container New class Rowid_filter_tracker was added. This class is needed to collect data about how rowid filter is executed.
This commit is contained in:
@@ -478,6 +478,8 @@ bool Range_rowid_filter::fill()
|
||||
file->position(quick->record);
|
||||
if (container->add(NULL, (char*) file->ref))
|
||||
rc= 1;
|
||||
else
|
||||
tracker->increment_container_elements_count();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,6 +490,7 @@ bool Range_rowid_filter::fill()
|
||||
file->pushed_idx_cond= pushed_idx_cond_save;
|
||||
file->pushed_idx_cond_keyno= pushed_idx_cond_keyno_save;
|
||||
file->in_range_check_pushed_down= in_range_check_pushed_down_save;
|
||||
tracker->report_container_buff_size(table->file->ref_length);
|
||||
|
||||
if (rc != HA_ERR_END_OF_FILE)
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user