Re: How Postgresql Compares... Count(*) and others

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mark kirkwood <markir(at)slingshot(dot)co(dot)nz>
Cc: Sean Chittenden <sean-pgsql-general(at)chittenden(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: How Postgresql Compares... Count(*) and others
Date: 2001-07-22 14:44:15
Message-ID: 20010722094415.A31190@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jul 22, 2001 at 03:06:52PM +1200,
Mark kirkwood <markir(at)slingshot(dot)co(dot)nz> wrote:
> Last time I tested this on the big O ( early 8.0.x ) count(*) was always
> fractionally quicker.... there was a body of thought at the time that said
> count(1) or count(<field>) was quicker.... no idea where it came from.

Note that count(<field>) and count(*) are not equivalent. count(<field>)
counts only rows where <field> isn't null.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message RentZone 2001-07-22 15:26:25 Re: Re: Planner estimates cost of 'like' a lot lower than '='??
Previous Message Mats Lofkvist 2001-07-22 14:37:56 Re: Planner estimates cost of 'like' a lot lower than '='??