Re: [PATCHES] updated patch for selecting large results sets in

From: Chris Mair <chrisnospam(at)1006(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] updated patch for selecting large results sets in
Date: 2006-08-28 19:17:30
Message-ID: 1156792650.4026.34.camel@dell.home.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 2006-08-28 at 13:45 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Tom Lane wrote:
> > > Wait a minute. What I thought we had agreed to was a patch to make
> > > commands sent with \g use a cursor. This patch changes SendQuery
> > > so that *every* command executed via psql is treated this way.
>
> > That's what I remembered. I don't think we want to introduce a
> > difference between ; and \g.
>
> Have we measured the performance impact, then? The last time I profiled
> psql, GetVariable was already a hotspot, and this introduces another
> call of it into the basic query loop whether you use the feature or not.
>
> regards, tom lane

Hi,

after agreeing on using a \set variable, I proposed to have it influence
"\g" as well as ";", because I thought that would be the most expected
behaviour. IMHO I'm with Peter, that introducing a difference between
"\g" and ";" would go against the principle of least surprise.

Performance-wise I took for granted without checking that GetVariable's
running time would be negligible.

[looks at the code]

I see it's it's basically two function calls with a loop over a linked
list of values (in the order of 10) doing strcmps and one strtol.
It is not quite clear to me what the impact of this is. I could
imagine it would show up only if you perform lots of trivial queries
through psql. I'm going to benchmark something now and report back.

Anyway, regardless the benchmark, I feel it's somehow not clean to have
a variable introduce a difference between "\g" and ";".

[goes benchmarking...]

Bye, Chris.

--

Chris Mair
http://www.1006.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-28 19:21:22 Re: autovacuum causing numerous regression-test failures
Previous Message Zoltan Boszormenyi 2006-08-28 19:07:10 Re: [HACKERS] Performance testing of COPY (SELECT) TO

Browse pgsql-patches by date

  From Date Subject
Next Message Joachim Wieland 2006-08-28 21:03:25 Re: [PATCHES] Another VPATH patch for ecpg
Previous Message Zoltan Boszormenyi 2006-08-28 19:07:10 Re: [HACKERS] Performance testing of COPY (SELECT) TO