Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    If storage engine is MyISAM and there are no WHERE conditions, count(*) will be faster, because exact record count is stored for MyISAM tables. Commented Mar 21, 2010 at 0:00
  • 1
    Your guess could backfire - COUNT(*) is the idiomatic way of getting the size of a result set, and any database worth its salt will be optimized for it. Commented Mar 21, 2010 at 0:00
  • 2
    And the * in Count(*) means "Don't look at the data, just count the records" as opposed to Count(colname).
    – VolkerK
    Commented Mar 21, 2010 at 0:07