From: Robert Haas Date: Fri, 27 Jan 2012 17:40:37 +0000 (-0500) Subject: Document that COUNT(*) might not need a seq scan any more. X-Git-Tag: REL9_2_BETA1~524 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb6af016fc04392c41106ac866072914bf66ecd0;p=postgresql Document that COUNT(*) might not need a seq scan any more. Noted by Josh Kupershmidt. --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 219ba9abf3..ec14004084 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -11102,8 +11102,10 @@ SELECT b1 = ANY((SELECT b2 FROM t2 ...)) FROM t1 ...; SELECT count(*) FROM sometable; - will be executed by PostgreSQL using a - sequential scan of the entire table. + will require effort proportional to the size of the table: + PostgreSQL will need to scan either the + entire table or the entirety of an index which includes all rows in + the table.