Bug #111225 | Inaccurate execution plan generation for primary key range query | ||
---|---|---|---|
Submitted: | 31 May 2023 13:23 | Modified: | 6 Jun 2023 3:42 |
Reporter: | shang canfang (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S5 (Performance) |
Version: | MySQL8.0.18,MySQL8.0.28 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | optimizer; execution plan; |
[31 May 2023 13:23]
shang canfang
[31 May 2023 13:32]
MySQL Verification Team
HI Mr. canfang, Thank you for your bug report. However, 8.0.18 is a very old release of 8.0. So, please first try 8.0.33, our latest release. Second, please provide us with. a full test case. That means a CREATE TABLE, INSERT with all data and a fully query. Next, please explain, in great detail, why do you think that searching by primary key is wrong !!!!! When you do all of this with 8.0.33, with all info supplied as above, create a new bug report. Please, do include all the info that we asked above. Unsupported.
[31 May 2023 13:35]
MySQL Verification Team
Hi Mr. canfang, Actually, the explanation for scanning is very simple. You have ORDER BY and it is MUCH faster to read by indexed column then to create, insert into a temporary table and then read from it. This is very well known fact. Hence, no need to create new report, since the method used is faster. If you want to use another method, you can always use Optimiser hints, as described in our Reference Manual. Not a bug.
[6 Jun 2023 3:42]
shang canfang
Sorry, I didn't express myself clearly. You didn't understand what I meant. But Innodb does not have much impact, it only has the issue of type index when the condition value is very small, which does not affect the time consumption. But Rocksdb doesn't work, so I mentioned the bug to MyRocks, although I think changing the SQL optimizer would be more appropriate. https://github.com/facebook/mysql-5.6/issues/1315
[6 Jun 2023 12:35]
MySQL Verification Team
Hi Mr. Canfang, We so not know what is RocksDB and we do not support it. What we wrote in our previous comments is very much true for our server. Hence, read them more carefully, please ...... Not a bug.