One Little, Two Little, Three Little Rows

[bobbojones@test parking] > select count(1) from mbta_passes;
+----------+
| count(1) |
+----------+
|   179399 |
+----------+
1 row in set (27.65 sec)

That’s just not cool.  It took 27.65 seconds to count the number of rows?  Using a small subset of test data?  On a test server that nobody else was using at the time of that query?  That is just not cool.

3 thoughts on “One Little, Two Little, Three Little Rows

  1. Awesome. I’m working on SQL IO performance issues, right now, with a client. I can think of quite a few reasons it would take so long to run that query. SQL Tuning is Fun!

  2. Ben says:

    How many of those reasons apply under the circumstances I described, though? Yes, it’s an InnoDB table, and our test servers are not necessarily the powerhouses our production servers are, but that’s still a very small number of rows to have counted in that period of time, neh?

Leave a Reply

Your email address will not be published. Required fields are marked *