Re: Various performance questions
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>, Greg Stark <gsstark@mit.edu>, Dror Matalon <dror@zapatec.com>, PostgreSQL Performance <pgsql-performance@postgresql.org>
Date: 2003-10-27T19:10:11Z
Lists: pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes: > Greg is correct. int8 is a pass-by-reference datatype Just to keep the conversation on track. the evidence from this particular post seems to indicate that my theory was wrong and the overhead for count(*) is _not_ a big time sink. It seems to be at most 10% and usually less. A simple "select 1 from tab" takes nearly as long. I'm still puzzled why the times on these are so different when the latter returns fewer records and both are doing sequential scans: select 1 from tab select 1 from tab where a < 1000 -- greg