Transactional databases which implement MVCC such as PostgreSQL and InnoDB perform COUNT(*) in a way that is very slow compared to non-transactional databases like MyISAM. The MyISAM engine in MySQL uses an index scan for COUNT(*) and also caches the result of the count, thus it is much faster. PostgreSQL and InnoDB require a table scan to locate all visible rows. These MVCC capable engines implement COUNT(*) this way because MVCC stores transaction visibility in the row data as opposed to the index. With MVCC capable databases, caching the COUNT(*) would result in incorrect data being returned. PostgreSQL 9.2 will have index-only scan support which uses the visibility map feature to determine whether a row is visible to the current transaction rather than visiting the page. This means dramatically faster COUNT(*) results.