Tagged articles
4 articles
Page 1 of 1
Architecture & Thinking
Architecture & Thinking
Oct 27, 2023 · Databases

How to Choose the Optimal Prefix Length for MySQL Indexes

This article explains why indexing long character columns can bloat MySQL indexes, introduces the concept of index selectivity, shows how to calculate the best prefix length with real‑world queries, and demonstrates performance differences between short and optimal index prefixes.

Prefix IndexSelectivityindex
0 likes · 8 min read
How to Choose the Optimal Prefix Length for MySQL Indexes
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 7, 2021 · Databases

Understanding MySQL Index Cardinality and Selectivity

This article explains the concept of MySQL index cardinality, how it influences index selectivity, factors that affect cardinality values, methods to view them, and demonstrates with practical examples how different data distributions and query patterns impact the optimizer's execution plans.

CardinalitySelectivitydatabase
0 likes · 11 min read
Understanding MySQL Index Cardinality and Selectivity
dbaplus Community
dbaplus Community
Oct 23, 2015 · Databases

How Oracle CBO Calculates Range Predicate Selectivity and Handles Strings

This article explains how Oracle's Cost‑Based Optimizer estimates the selectivity of range predicates without histograms, demonstrates calculations with sample data, shows PL/SQL code for converting string values to internal numbers, and discusses pitfalls such as identical internal values causing cardinality errors, offering solutions like gathering histograms or using DATE columns.

CBODatabase OptimizationOracle
0 likes · 8 min read
How Oracle CBO Calculates Range Predicate Selectivity and Handles Strings