Tag

index usage

0 views collected around this technical thread.

Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 2, 2024 · Databases

Does MySQL’s OR Operator Use Indexes? Experimental Findings and Optimization Tips

The article demonstrates through a practical experiment that MySQL will use indexes for an OR condition only when both operands are indexed, otherwise it falls back to a full table scan, and it suggests using UNION as an optimization when one side lacks an index.

Database PerformanceMySQLOR operator
0 likes · 4 min read
Does MySQL’s OR Operator Use Indexes? Experimental Findings and Optimization Tips
Top Architect
Top Architect
Jul 5, 2021 · Databases

MySQL Implicit Type Conversion Leads to Unexpected Query Results

This article explains how MySQL implicitly converts mismatched column types—such as comparing a VARCHAR column with a numeric literal—into floating‑point numbers, causing seemingly equal values to match, losing index usage, and potentially producing incorrect query results.

Floating PointMySQLVARCHAR
0 likes · 7 min read
MySQL Implicit Type Conversion Leads to Unexpected Query Results