Re: which one is faster

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: Marcin Mirosław <marcin(at)mejor(dot)pl>, pgsql-performance(at)postgresql(dot)org
Subject: Re: which one is faster
Date: 2010-10-26 12:23:21
Message-ID: AANLkTikNYrEKhr=rFpGyEhgROv1wWE1XJk_ve1wtshCV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2010/10/26 Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>

> 2010/10/26 Szymon Guz <mabewlun(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2010-10-26 12:23:26 Re: No hash join across partitioned tables?
Previous Message Grzegorz Jaśkiewicz 2010-10-26 12:20:33 Re: which one is faster