From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Dror Matalon <dror@zapatec.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Various performance questions
Date: 27 Oct 2003 14:10:11 -0500
Message-ID: <87n0bmwl7w.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <1735.1067280732@sss.pgh.pa.us>
References: <20031026194449.GD2979@rlx11.zapatec.com>
<87u15vxrue.fsf@stark.dyndns.tv>
<1067269309.459.33.camel@tokyo>
<877k2qy36r.fsf@stark.dyndns.tv>
<1067280005.463.48.camel@tokyo>
<1735.1067280732@sss.pgh.pa.us>
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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, neilc@samurai.com, dror@zapatec.com
Subject: Re: Various performance questions
In-Reply-To: <87n0bmwl7w.fsf@stark.dyndns.tv>
* 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