Re: performance difference in count(1) vs. count(*)?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Bertheau <twanger(at)bluetwanger(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: performance difference in count(1) vs. count(*)?
Date: 2002-07-28 17:02:49
Message-ID: 11471.1027875769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Bertheau <twanger(at)bluetwanger(dot)de> writes:
> is there a difference performance-wise between select count(1) and
> select count(*)?

Nope. In fact, the latter is converted to the former during parsing.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Lee Harr 2002-07-28 18:13:39 Re: using LIMIT only on primary table
Previous Message Markus Bertheau 2002-07-28 15:50:22 performance difference in count(1) vs. count(*)?