When GBase 8a Execution Plans Go Wrong: Mastering Statistics Management
The article discusses the importance of managing statistics in GBase 8a to ensure optimal execution plans. It highlights how stale statistics can lead to inefficient query performance, such as full table scans. The guide provides steps for inspecting and updating statistics, as well as common issues and their solutions.
- ▪GBase 8a's optimizer relies on three layers of statistics: table-level, column-level, and block-level.
- ▪Stale or inaccurate statistics can cause the optimizer's cost estimates to drift, resulting in poor execution plans.
- ▪Manual updates to statistics should be triggered after bulk loads, performance drops, or significant changes in cardinality.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3830930) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Michael Posted on May 19 • Originally published at gbase.cn When GBase 8a Execution Plans Go Wrong: Mastering Statistics Management #gbase #database #数据库 #performance A simple SQL suddenly triggers a full table scan, or a JOIN order looks completely off. Most of the time, the culprit is stale statistics misleading the optimizer. This guide walks through how GBase 8a's statistics work, how to read execution plans, and what to do when the optimizer gets it wrong in a gbase database.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).