Skip to content

Instantly share code, notes, and snippets.

@tamalw
Created June 15, 2011 16:53
Show Gist options
  • Save tamalw/1027536 to your computer and use it in GitHub Desktop.
Save tamalw/1027536 to your computer and use it in GitHub Desktop.
PostgreSQL COUNT(*) performance
EXPLAIN ANALYZE
SELECT
COUNT(*)
FROM jivemessage
Row QUERY PLAN
1 Aggregate (cost=1085701.27..1085701.28 rows=1 width=0) (actual time=111295.699..111295.699 rows=1 loops=1)
2 -> Seq Scan on jivemessage (cost=0.00..1052949.61 rows=13100661 width=0) (actual time=10.628..108926.771 rows=13100661 loops=1)
3 Total runtime: 111295.761 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment