explain select count(x.*) from customer x;
...
-> Partial Aggregate (cost=27005.45..27005.46 rows=1 width=8)
-> Parallel Seq Scan on customer x (cost=0.00..26412.56 rows=237156 width=994)
explain select count(*) from customer x;
...
-> Partial Aggregate (cost=27005.45..27005.46 rows=1 width=8)
-> Parallel Seq Scan on customer x (cost=0.00..26412.56 rows=237156 width=0)
The COUNT(x.*) here makes the width in the explain result read unnecessary row data.
I thought they should be identical, but it seems not, why?
x.*away and checks for each and every row whether it's null or not: See e.g. here: https://blog.jooq.org/2019/09/19/whats-faster-count-or-count1/ – Mar 18 '22 at 10:11