pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
performance difference in count(1) vs. count(*)?
2+ messages / 2 participants
[nested] [flat]

* performance difference in count(1) vs. count(*)?
@ 2002-07-28 15:50  Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Markus Bertheau @ 2002-07-28 15:50 UTC (permalink / raw)
  To: pgsql-sql

Hello,

is there a difference performance-wise between select count(1) and
select count(*)?

-- 
Markus Bertheau.
Berlin, Berlin.
Germany.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: performance difference in count(1) vs. count(*)?
@ 2002-07-28 17:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2002-07-28 17:02 UTC (permalink / raw)
  To: Markus Bertheau <twanger@bluetwanger.de>; +Cc: pgsql-sql

Markus Bertheau <twanger@bluetwanger.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-07-28 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-28 15:50 performance difference in count(1) vs. count(*)? Markus Bertheau <twanger@bluetwanger.de>
2002-07-28 17:02 ` Tom Lane <tgl@sss.pgh.pa.us>

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