Tagged articles
18 articles
Page 1 of 1
Tech Freedom Circle
Tech Freedom Circle
Jan 3, 2026 · Databases

How Many Values Can MySQL IN Handle? 100K‑10M IDs and the Ultimate Solution

An interview scenario reveals that using a massive IN list (hundreds of thousands of IDs) in MySQL quickly exceeds packet limits, forces full‑table scans, and overloads CPU, while batch IN queries cause network storms; the article dissects these pitfalls and presents three progressive strategies—splitting IN, temporary tables with JOIN, and sharding with stream‑merge—to safely query massive ID sets.

IN clausemysqlquery optimization
0 likes · 32 min read
How Many Values Can MySQL IN Handle? 100K‑10M IDs and the Ultimate Solution
ITPUB
ITPUB
Dec 20, 2025 · Databases

Why MySQL IN Clauses Hit Limits and How to Optimize Them

This article explains the reasons behind MySQL IN‑clause parameter limits, the performance impact of large IN lists, and provides practical optimization techniques such as splitting queries in application code and using temporary tables with EXISTS to improve efficiency.

IN clauseSQL Optimizationmysql
0 likes · 5 min read
Why MySQL IN Clauses Hit Limits and How to Optimize Them
Java Tech Enthusiast
Java Tech Enthusiast
Jun 7, 2025 · Databases

How to Optimize Multi-Table Joins in MySQL: Practical Strategies

This article explains why excessive MySQL joins can cause performance problems and provides a comprehensive set of techniques—including query splitting, temporary tables, denormalization, index tuning, query rewriting, result‑set reduction, configuration tweaks, big‑data tools, and summary tables—to effectively optimize multi‑table join queries.

Database PerformanceDenormalizationJOIN optimization
0 likes · 10 min read
How to Optimize Multi-Table Joins in MySQL: Practical Strategies
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 13, 2022 · Databases

Bypassing GTID Restrictions on CREATE TABLE … SELECT and Temporary Tables in MySQL 5.6/5.7 and Their Removal in MySQL 8.0

The article explains the strict GTID‑based replication limits on CREATE TABLE … SELECT and temporary‑table statements in MySQL 5.6/5.7, demonstrates practical work‑arounds such as splitting statements or using CREATE TABLE LIKE, and shows how MySQL 8.0’s native DDL atomicity eliminates these constraints.

DDLGTIDMySQL8.0
0 likes · 12 min read
Bypassing GTID Restrictions on CREATE TABLE … SELECT and Temporary Tables in MySQL 5.6/5.7 and Their Removal in MySQL 8.0
Selected Java Interview Questions
Selected Java Interview Questions
May 5, 2021 · Databases

Understanding MySQL Temporary Tables, MEM_ROOT Memory Management, and Query Optimization

This article explains how MySQL processes a GROUP BY query on a user view table, detailing the creation and use of memory and disk temporary tables, the MEM_ROOT allocation mechanism, the execution stages revealed by EXPLAIN, and how adding a composite index can eliminate temporary tables and filesort for better performance.

GROUP BYMemory Managementindex
0 likes · 13 min read
Understanding MySQL Temporary Tables, MEM_ROOT Memory Management, and Query Optimization
JavaEdge
JavaEdge
Aug 25, 2020 · Databases

Mastering MySQL Temporary Tables: Creation, Usage, and Deletion

This guide explains what MySQL temporary tables are, how they exist only for the current connection, provides step‑by‑step SQL examples for creating, inserting, querying, and dropping a temporary table, and discusses practical scenarios such as high‑concurrency writes.

SQLdatabasemysql
0 likes · 3 min read
Mastering MySQL Temporary Tables: Creation, Usage, and Deletion
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 3, 2020 · Databases

Optimizing a Slow MySQL Query with Derived Tables and UNION ALL

This article analyzes a slow MySQL aggregation query that joins a large table with a derived table built from many UNION ALL subqueries, explains the execution plan and derived‑table materialization, and presents two optimization approaches—adding taskname indexes and rewriting the query or using a temporary indexed table—to dramatically reduce execution time while preserving result semantics.

Derived TableSQLUnion All
0 likes · 11 min read
Optimizing a Slow MySQL Query with Derived Tables and UNION ALL
Liangxu Linux
Liangxu Linux
Mar 17, 2019 · Databases

How to Find and Remove Duplicate Rows in SQL Tables

This guide explains how to define duplicate rows, use GROUP BY and HAVING to locate them, and apply temporary tables and DELETE statements to remove duplicates while preserving the row with the smallest ID.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in SQL Tables
MaGe Linux Operations
MaGe Linux Operations
Apr 26, 2018 · Databases

Find Duplicate Rows in MySQL: Simple Queries for Beginners

This article shows how to identify and remove duplicate rows in a MySQL table by defining duplication, using GROUP BY with HAVING, creating temporary tables with MIN, and applying various techniques—including UNION, nested subqueries, and joins—to handle single‑column and multi‑column duplicate detection.

GROUP BYHAVINGSQL
0 likes · 11 min read
Find Duplicate Rows in MySQL: Simple Queries for Beginners
ITPUB
ITPUB
Apr 25, 2018 · Databases

Optimizing Large-Scale Joins with Oracle Temporary Tables: Strategies & Pitfalls

Facing a 20‑million‑row master table and millions of rows in up to ten child tables, the article examines the inefficiencies of repeated IN‑clause queries and presents three alternative strategies—including a single‑SQL join, a UNION ALL view, and the use of global temporary tables—detailing their trade‑offs and experimental results.

JOINOracleSQL Optimization
0 likes · 10 min read
Optimizing Large-Scale Joins with Oracle Temporary Tables: Strategies & Pitfalls
ITPUB
ITPUB
Mar 13, 2018 · Databases

Optimizing Large-Scale Oracle Queries with Temporary Tables

This article examines a high‑volume Oracle query scenario, explains why using multiple IN clauses on millions of rows leads to costly full‑table scans, and presents three alternative strategies—including a single‑SQL join, UNION ALL view, and temporary‑table approaches—along with practical examples and performance considerations.

Database PerformanceOracleSQL
0 likes · 10 min read
Optimizing Large-Scale Oracle Queries with Temporary Tables
ITPUB
ITPUB
Nov 14, 2016 · Databases

Optimizing Large‑Scale Oracle Queries with Temporary Tables: Strategies and Trade‑offs

This article examines a high‑volume Oracle query scenario, critiques the current multi‑IN approach, and presents three alternative solutions—including a single‑SQL join, a UNION ALL view, and the use of global temporary tables—detailing their performance implications and practical trade‑offs.

Database PerformanceIndex ScanOracle
0 likes · 10 min read
Optimizing Large‑Scale Oracle Queries with Temporary Tables: Strategies and Trade‑offs
ITPUB
ITPUB
Jul 6, 2016 · Databases

Why CTEs Can Kill SSIS Performance and How to Fix It

A developer encountered severe slowdown when joining a remote server query via a CTE in SSIS, analyzed the underlying CTE and Nested Loops behavior, and resolved the issue by materializing the remote data into a temporary table, achieving a dramatic performance boost.

CTESQL ServerSSIS
0 likes · 7 min read
Why CTEs Can Kill SSIS Performance and How to Fix It