Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5E529637F86 for ; Thu, 2 Apr 2009 19:39:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 31373-04 for ; Thu, 2 Apr 2009 19:39:25 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by mail.postgresql.org (Postfix) with ESMTP id BD7CE637FB5 for ; Thu, 2 Apr 2009 19:39:31 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 2488C754ADE; Thu, 2 Apr 2009 22:39:30 +0000 (UTC) MIME-Version: 1.0 To: pgsql-committers@postgresql.org Subject: pgsql: Refactor ExecProject and associated routines so that fast-path X-Mailer: activitymail 1.24, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain Message-Id: <20090402223930.2488C754ADE@cvs.postgresql.org> Date: Thu, 2 Apr 2009 22:39:30 +0000 (UTC) From: tgl@postgresql.org (Tom Lane) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/26 X-Sequence-Number: 36520 Log Message: ----------- Refactor ExecProject and associated routines so that fast-path code is used for simple Var targetlist entries all the time, even when there are other entries that are not simple Vars. Also, ensure that we prefetch attributes (with slot_getsomeattrs) for all Vars in the targetlist, even those buried within expressions. In combination these changes seem to significantly reduce the runtime for cases where tlists are mostly but not exclusively Vars. Per my proposal of yesterday. Modified Files: -------------- pgsql/src/backend/executor: execQual.c (r1.243 -> r1.244) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.243&r2=1.244) execUtils.c (r1.157 -> r1.158) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execUtils.c?r1=1.157&r2=1.158) pgsql/src/include/nodes: execnodes.h (r1.202 -> r1.203) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h?r1=1.202&r2=1.203)