Search Postgresql Archives

Re: count(*) vs count(id)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Feb 1, 2021 at 7:19 PM Guillaume Lelarge <guillaume@xxxxxxxxxxxx> wrote:


You're doing a left join, so I guess there's no row where call_records.timestamp::date = 2020-08-30. That would result with a NULL id.


Thanks for the excellent analysis everyone. I appreciate it!

Here is the documentation (for anyone reading the mailing list in the future...)

count(*)   bigint number of input rows
count(_expression_) any bigint number of input rows for which the value of _expression_ is not null

Have a great night (or equivalent for your TZ).

-m


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux