Tagged articles
2 articles
Page 1 of 1
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
dbaplus Community
dbaplus Community
Nov 30, 2016 · Databases

Why Updating a View Can Kill Oracle Performance—and How to Fix It

A detailed Oracle case study shows how a seemingly harmless view modification triggered a cascade of performance regressions, how nested UNION ALLs, missing indexes, and optimizer choices prevented predicate pushdown, and the step‑by‑step rewrites—including hints, index creation, and scalar subqueries—that finally restored fast query execution.

OraclePredicate PushdownSQL
0 likes · 13 min read
Why Updating a View Can Kill Oracle Performance—and How to Fix It