I've been trying this on PG 9.4 and here I get that count(*) is consistently slightly faster than count(1).
Actually, now I'm finding that they are about the same. On PG 9.4
count() can be faster if we enfore index to use but not extra ordinary benefits. I have tested with very high volume about 130000000 rows.
I've been trying this on PG 9.4 and here I get that count(*) is consistently slightly faster than count(1).
ReplyDeleteActually, now I'm finding that they are about the same. On PG 9.4
ReplyDeletecount() can be faster if we enfore index to use but not extra ordinary benefits. I have tested with very high volume about 130000000 rows.
ReplyDelete