Bug #115379 | ha_innobase::read_time , primary key, rows <=2, return rows | ||
---|---|---|---|
Submitted: | 19 Jun 2024 7:00 | Modified: | 19 Jun 2024 9:53 |
Reporter: | XIAOJING LI | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | cost model, sql optimizer |
[19 Jun 2024 7:00]
XIAOJING LI
[19 Jun 2024 9:53]
MySQL Verification Team
Hi Mr. Li, Thank you for your bug report. The code that you quote is actually made based on the empirical measurements and experiments. These are all internal researches and not available to the public. Besides empirical measurements, that were done by our company on all of our storage engines, post-graduate studies on the Optimiser also teach the same. Simply, reading blocks of disk segments and i-nodes sequentially is always much faster then doing lot's of seeks and jumping around the index. Also, do not forget that InnoDB's primary key is actually an embedded key. Not a bug.