aligputf8=# explain select count(1) from pg_class group by oid; QUERY PLAN ---------------------------------------------------------------------- HashAggregate (cost=1721.40..2020.28 rows=23910 width=4) Group By: oid -> Seq Scan on pg_class (cost=0.00..1004.10 rows=143460 width=4) Settings: enable_seqscan=on (4 rows)