pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Grzegorz Jaśkiewicz <gryzman@gmail.com>
To: Szymon Guz <mabewlun@gmail.com>
Cc: Marcin Mirosław <marcin@mejor.pl>
Cc: pgsql-performance@postgresql.org
Subject: Re: which one is faster
Date: Tue, 26 Oct 2010 13:20:33 +0100
Message-ID: <AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=sidQSMAPNVJF9_EJ7xUiNX65ujsSXb9mF9RhN@mail.gmail.com>
References: <AANLkTimgjmGCcxjSmf6BvQ=BBGLBrMspfcFgWhrpsVVr@mail.gmail.com>
	<AANLkTikWbbFNykGXdobR06dsePn40JrBYvfFZLmu+H1j@mail.gmail.com>
	<4CC6C287.8070803@mejor.pl>
	<AANLkTi=sOW-X+DcZPaBk1S_sHzJV97XrSOHmsSXsYpeo@mail.gmail.com>
	<AANLkTinuLB_oZfFT17irk3OH-0q=QJnCpYWN6PED0LRY@mail.gmail.com>
	<AANLkTi=sidQSMAPNVJF9_EJ7xUiNX65ujsSXb9mF9RhN@mail.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++;



-- 
GJ



view thread (9+ messages)  latest in thread

Message-ID: <AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com>
Permalink:  ../AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gryzman@gmail.com, mabewlun@gmail.com, marcin@mejor.pl
  Subject: Re: which one is faster
  In-Reply-To: <AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com>
  References: <AANLkTimgjmGCcxjSmf6BvQ=BBGLBrMspfcFgWhrpsVVr@mail.gmail.com> <AANLkTikWbbFNykGXdobR06dsePn40JrBYvfFZLmu+H1j@mail.gmail.com> <4CC6C287.8070803@mejor.pl> <AANLkTi=sOW-X+DcZPaBk1S_sHzJV97XrSOHmsSXsYpeo@mail.gmail.com> <AANLkTinuLB_oZfFT17irk3OH-0q=QJnCpYWN6PED0LRY@mail.gmail.com> <AANLkTi=sidQSMAPNVJF9_EJ7xUiNX65ujsSXb9mF9RhN@mail.gmail.com> <AANLkTimx3bcBoxVeU1CLVONGn+UE-Cf14UzNPgciL6Vp@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox