Re: which one is faster - Mailing list pgsql-performance

From Szymon Guz
Subject Re: which one is faster
Date
Msg-id AANLkTikNYrEKhr=rFpGyEhgROv1wWE1XJk_ve1wtshCV@mail.gmail.com
Whole thread Raw
In response to Re: which one is faster  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
List pgsql-performance


2010/10/26 Grzegorz Jaśkiewicz <gryzman@gmail.com>
2010/10/26 Szymon Guz <mabewlun@gmail.com>:
>
> Well, strange. Why is that slower?

To answer that fully, you would need to see the implementation.
suffice to say,

count(a) does:

if (a <> NULL)
{
 count++;
}

and count(*) does:

 count++;



Yup, I was afraid of that, even if there is not null on the column... but I think usually nobody notices the difference with count.

regards
Szymon

pgsql-performance by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: which one is faster
Next
From: Robert Haas
Date:
Subject: Re: No hash join across partitioned tables?