Re: count(*) vs count(id) - Mailing list pgsql-general

From Tom Lane
Subject Re: count(*) vs count(id)
Date
Msg-id 3502043.1612226098@sss.pgh.pa.us
Whole thread Raw
In response to Re: count(*) vs count(id)  (Matt Zagrabelny <mzagrabe@d.umn.edu>)
Responses Re: count(*) vs count(id)
List pgsql-general
Matt Zagrabelny <mzagrabe@d.umn.edu> writes:
> On Mon, Feb 1, 2021 at 5:57 PM Rob Sargent <robjsargent@gmail.com> wrote:
>> You got one null from count(*) likely.

> What is count(*) counting then? I thought it was rows.

Yeah, but count(id) only counts rows where id isn't null.

            regards, tom lane



pgsql-general by date:

Previous
From: Matt Zagrabelny
Date:
Subject: Re: count(*) vs count(id)
Next
From: Matt Zagrabelny
Date:
Subject: Re: count(*) vs count(id)