Bug #120797 Poor plan for DISTINCT Cartesian product: hash join materializes full product while NO_BNL is about 50x faster
Submitted: 27 Jun 15:18 Modified: 2 Jul 13:29
Reporter: ZHAOYANG ZHANG 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
Tags: cartesian product, cost, distinct, hash join, NO_BNL, Optimizer hints

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 15:18] ZHAOYANG ZHANG
Reproducible SQL test case with schema, data, and ANALYZE TABLE statements.

Attachment: create_tables_insert_data.sql (application/octet-stream, text), 13.06 KiB.