GBase 8a Query Optimization in Practice: EXPLAIN, Materialized Views, CTE, and Common Tuning Techniques (opens in new tab)
This article starts from real slow queries and explains how to read execution plans with EXPLAIN, use materialized views correctly, when to apply CTEs, and several high‑frequency query tuning tips in a gbase database. 1. Reading Execution Plans with EXPLAIN Basic Usage EXPLAIN SELECT dept_id, SUM(amount) FROM orders WHERE order_date >= '2024-01-01' GROUP BY dept_id; The EXPLAIN output in GBase 8a is a tree structure. Each row represents an operator, and execution proceeds from bottom to top, ...
Read the original article