From: Tom Lane <tgl@sss.pgh.pa.us>
To: Miroslav ulc <miroslav.sulc@startnet.cz>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] How to read query plan
Date: Mon, 14 Mar 2005 00:00:11 -0500
Message-ID: <4850.1110776411@sss.pgh.pa.us> (raw)
In-Reply-To: <6715.1110758921@sss.pgh.pa.us>
References: <42345D24.8070104@startnet.cz>
<4234692E.3050802@arbash-meinel.com>
<42347407.2000202@startnet.cz>
<423478B1.7080106@arbash-meinel.com>
<18381.1110741354@sss.pgh.pa.us>
<423497FE.6040908@startnet.cz>
<19293.1110743673@sss.pgh.pa.us>
<42349C96.60401@startnet.cz>
<3174.1110745587@sss.pgh.pa.us>
<4234AF56.1040509@startnet.cz>
<6715.1110758921@sss.pgh.pa.us>
I wrote:
> Since ExecProject operations within a nest of joins are going to be
> dealing entirely with Vars, I wonder if we couldn't speed matters up
> by having a short-circuit case for a projection that is only Vars.
> Essentially it would be a lot like execJunk.c, except able to cope
> with two input tuples. Using heap_deformtuple instead of retail
> extraction of fields would eliminate the O(N^2) penalty for wide tuples.
Actually, we already had a pending patch (from Atsushi Ogawa) that
eliminates that particular O(N^2) behavior in another way. After
applying it, I get about a factor-of-4 reduction in the runtime for
Miroslav's example.
ExecEvalVar and associated routines are still a pretty good fraction of
the runtime, so it might still be worth doing something like the above,
but it'd probably be just a marginal win instead of a big win.
regards, tom lane
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: tgl@sss.pgh.pa.us, miroslav.sulc@startnet.cz, pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] How to read query plan
In-Reply-To: <4850.1110776411@sss.pgh.pa.us>
* 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