Bug #120793 Default heuristic pruning misses join-connected prefix in 3-table query, causing ~40x slower plan
Submitted: 27 Jun 11:52 Modified: 8 Jul 9:30
Reporter: Zack Morgan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S5 (Performance)
Version:9.7.1 OS:Ubuntu (22.04.4 LTS)
Assigned to: CPU Architecture:x86 (Intel(R) Xeon(R) Gold 5220 CPU @ 2.20GHz)
Tags: heuristic-pruning, join-order, natural-join, Optimizer, optimizer-prune-level, 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:

[27 Jun 11:53] Zack Morgan
SQL scripts to reproduce a MySQL 9.7.1 join-order heuristic pruning performance issue.

Attachment: mysql971-3table-join-order-pruning-repro.zip (application/x-zip-compressed, text), 7.06 KiB.

[2 Jul 3:26] Zack Morgan
mysql_bug120793_scaled_supplement_repro sql file and output file

Attachment: mysql_bug120793_scaled_supplement_repro.zip (application/x-zip-compressed, text), 4.91 KiB.