Senior Tony
Dec 6, 2024 · Databases
Why MySQL COUNT(*) Can Be Milliseconds Fast: Engine Tricks & Optimization Strategies
This article explains why COUNT(*) on a large InnoDB table can take seconds while MyISAM returns instantly, explores the underlying storage‑engine differences, and presents six practical techniques—including Redis counters, counting tables with transactions or triggers, parallel read threads, secondary indexes, and SHOW TABLE STATUS—to dramatically speed up row counting in MySQL.
COUNTInnoDBMySQL
0 likes · 9 min read
