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

From Grzegorz Jaśkiewicz
Subject Re: which one is faster
Date
Msg-id AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com
Whole thread Raw
In response to Re: which one is faster  (Szymon Guz <mabewlun@gmail.com>)
Responses Re: which one is faster
List pgsql-performance
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++;



--
GJ

pgsql-performance by date:

Previous
From: Szymon Guz
Date:
Subject: Re: which one is faster
Next
From: Szymon Guz
Date:
Subject: Re: which one is faster