Bug #116321 | Index push down may lead to performance degradation | ||
---|---|---|---|
Submitted: | 9 Oct 10:34 | Modified: | 10 Oct 10:57 |
Reporter: | yijie fu | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 9.0.1-1.el9 | OS: | MacOS (14.5 (23F79)) |
Assigned to: | CPU Architecture: | Any (Apple M1) |
[9 Oct 10:34]
yijie fu
[9 Oct 11:57]
MySQL Verification Team
Hi Mr. fu, Thank you for your bug report. However, version 5.7 is no longer supported. Unsupported.
[10 Oct 2:31]
yijie fu
There is the same issue in this version
[10 Oct 3:03]
yijie fu
version 9.0.1-1.el9 is the same as 5.7.
[10 Oct 9:46]
MySQL Verification Team
Hi Mr. fu, We ran your test case and got the following results: id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 SIMPLE bjcrm_custom_clockin NULL ref un_orderid_cpid_type un_orderid_cpid_type 16 const,const 1 100.00 NULL id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 SIMPLE bjcrm_custom_clockin NULL range un_orderid_cpid_type un_orderid_cpid_type 20 NULL 1 100.00 Using index condition This is expected behaviour, since the optimiser plans are different. This is all explained in our Reference Manual. Not a bug.
[10 Oct 10:32]
MySQL Verification Team
Hi, Some final explanations ........ For the reference search, only first two columns of the index were needed, while for the range search, the entire index is required. That is very well known manner in resolving these two different plans. Not a bug.
[10 Oct 10:57]
yijie fu
Hi sorry this is not a bug. I am wrong. but,Why do search criterias have to be used?! search criterias 'WHERE cpid =247754680960946 and order_id = 4736980658321856 AND clock_in_type >1' change to 'WHERE cpid =247754680960946 and order_id = 4736980658321856' ,the key lenth while be shorter. Does it mean that the chosen execution plan is better? Is it necessary to filter out the query criteria when selecting the execution plan and then choose the optimal execution plan?
[10 Oct 13:06]
MySQL Verification Team
Hi, The answer is simple: Yes, it is !!!!