Bug #120868 Optimizer misses ORDER BY LIMIT optimization when ordering key is equivalent through join equality
Submitted: 5 Jul 8:42 Modified: 6 Jul 5:29
Reporter: Zack Morgan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S5 (Performance)
Version:9.7.1 OS:Linux (22.04.4 LTS)
Assigned to: CPU Architecture:x86 (x86_64, Intel(R) Xeon(R) Gold 5220)
Tags: join-order, limit, Optimizer, order-by, performance

File: Maximum allowed size is 50MB.
Description:
Privacy:

If the data you need to attach is more than 50MB, you should create a compressed archive of the data, split it to 50MB chunks, and upload each of them as a separate attachment.

To split a large file:

[5 Jul 8:46] Zack Morgan
Reproducible testcase and result log for Bug #120868: includes the SQL script and my MySQL 9.7.1 EXPLAIN ANALYZE output.

Attachment: mysql_order_limit_equivalent_order_key_missed.zip (application/x-zip-compressed, text), 6.19 KiB.