Need someone to lead product management at your software company? I build high-craft software and the teams that build it. I'm looking for my next opportunity. Check out my resume and get in touch.

This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.

count(*) in InnoDB

Freshness Warning
This blog post is over 17 years old. It's possible that the information you read below isn't current and the links no longer work.

I’d always read that an advantage of MySQL’s MyISAM tables over InnoDB tables was the performance of counting rows with count(*). Conventional wisdom says if you do count(*) with InnoDB you’ll see much slower results on large tables than if you use MyISAM.

I hadn’t ever noticed that difference. In places in my apps where I do count(*) InnoDB seems to be just as fast as MyISAM—even on tables with millions of rows. MySQL Performance Blog has an explanation.

It only applies to COUNT(*) queries without WHERE clause. SELECT COUNT(*) FROM USER ... will be much faster for MyISAM. SELECT COUNT(*) FROM IMAGE WHERE USER_ID=5 ... will be executed same way both for MyISAM and Innodb.

Since most real-world usage of count(*) is in determining how many rows are returned by a query, not how many rows exist in a table, most people won’t need to concern themselves with this performance "issue."

Recently Written

Building the Next Big Thing: A Framework for Your Second Product
Nov 19: You need a first product sooner than you think. Here's a framework for helping you identify a winner.
A Framework for Scaling product teams
Oct 9: The people, processes, and systems that make up a product organization change radically as you go through the stages of a company. This framework will guide that scaling.
My Networked Webcam Setup
Sep 25: A writeup of my network-powered conference call camera setup.
Roadmap Outcomes, not Features
Sep 4: Drive success by roadmapping the outcomes you'll create instead of the features you'll deliver.
Different roadmaps for different folks
Sep 2: The key to effective roadmapping? Different views for different needs.
Micromanaging and competence
Jul 2: Providing feedback or instruction can be seen as micromanagement unless you provide context.
My productivity operating system
Jun 24: A framework for super-charging productivity on the things that matter.
Great product managers own the outcomes
May 14: Being a product manager means never having to say, "that's not my job."

Older...

What I'm Reading