Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
The InnoDB srv_stats counters n_rows_updated, n_rows_deleted, n_rows_inserted, and n_rows_read are duplicating Handler_update, Handler_delete, Handler_write, and various Handler_read_ counters.
Updating those counters is not free, especially because some counters are furthermore split to distinguish a rare case of modifying tables in the system schema:
if (table->is_system_db) { |
srv_stats.n_system_rows_updated.inc(size_t(trx->id)); |
} else { |
srv_stats.n_rows_updated.inc(size_t(trx->id)); |
}
|
On a related note, handler::increment_statistics() which updates the common status variables, does not employ any caching or sharding whatsoever. It could be better to first update the counters directly in handler data members and only update global counts at the end of each statement.
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-31772 Innodb_rows_* missing on mariadb-server 10.11.3
- Stalled