pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexey Dokuchaev <danfe@nsu.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics
Date: Tue, 22 May 2018 00:24:35 +0700
Message-ID: <20180521172435.GA12264@regency.nsu.ru> (raw)
In-Reply-To: <8937.1526921696@sss.pgh.pa.us>
References: <20180521125441.GA85087@regency.nsu.ru>
	<CAKFQuwaQ_jGJF5OZEvfz=J99BS5i6BeBZO+35RQnK-foBo1EPQ@mail.gmail.com>
	<30939.1526913927@sss.pgh.pa.us>
	<20180521162831.GA97361@regency.nsu.ru>
	<5595.1526919652@sss.pgh.pa.us>
	<20180521170113.GA6259@regency.nsu.ru>
	<8937.1526921696@sss.pgh.pa.us>

On Mon, May 21, 2018 at 12:54:56PM -0400, Tom Lane wrote:
> Alexey Dokuchaev <danfe@nsu.ru> writes:
> > Quick reality check question: are count(*) vs. count(_) equivalent
> > above?
> 
> Only if _ is guaranteed non-null ... which, as a rowtype result, it
> probably is.  But I'd use count(*) if you're concerned about speed.

Understood.  Yes, my primary concern (after correctness) is speed.  Thank
you all again for very helpful and prompt replies guys.

./danfe




view thread (9+ messages)

Message-ID: <20180521172435.GA12264@regency.nsu.ru>
Permalink:  ../20180521172435.GA12264@regency.nsu.ru/
Also on:    postgresql.org/message-id/20180521172435.GA12264@regency.nsu.ru

 · 

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-general@postgresql.org
  Cc: danfe@nsu.ru, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com
  Subject: Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics
  In-Reply-To: <20180521172435.GA12264@regency.nsu.ru>
  References: <20180521125441.GA85087@regency.nsu.ru> <CAKFQuwaQ_jGJF5OZEvfz=J99BS5i6BeBZO+35RQnK-foBo1EPQ@mail.gmail.com> <30939.1526913927@sss.pgh.pa.us> <20180521162831.GA97361@regency.nsu.ru> <5595.1526919652@sss.pgh.pa.us> <20180521170113.GA6259@regency.nsu.ru> <8937.1526921696@sss.pgh.pa.us> <20180521172435.GA12264@regency.nsu.ru>

* 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