Tag

SQL Hint

1 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 7, 2023 · Databases

When Does MySQL Use Internal Temporary Tables? Analysis of UNION, GROUP BY and Other Scenarios

This article explains the circumstances under which MySQL creates internal temporary tables, illustrating the behavior with UNION, UNION ALL, GROUP BY, various hints, and additional query patterns, and provides practical examples and execution plans to help developers understand and optimise their queries.

GROUP BYPerformanceSQL Hint
0 likes · 13 min read
When Does MySQL Use Internal Temporary Tables? Analysis of UNION, GROUP BY and Other Scenarios