X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E295F5636D; Mon, 14 Mar 2005 19:22:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31014-02; Mon, 14 Mar 2005 19:22:39 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 10A9E567FF; Mon, 14 Mar 2005 19:22:35 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2EJMZEP029031; Mon, 14 Mar 2005 14:22:35 -0500 (EST) To: =?windows-1250?Q?Miroslav_=8Aulc?= Cc: pgsql-hackers@postgreSQL.org, pgsql-performance@postgreSQL.org Subject: Re: Avoiding tuple construction/deconstruction during joining In-reply-to: <4235E1EF.2000402@startnet.cz> References: <42345D24.8070104@startnet.cz> <14577.1110821062@sss.pgh.pa.us> <4235E1EF.2000402@startnet.cz> Comments: In-reply-to =?windows-1250?Q?Miroslav_=8Aulc?= message dated "Mon, 14 Mar 2005 20:11:43 +0100" Date: Mon, 14 Mar 2005 14:22:35 -0500 Message-ID: <29030.1110828155@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/457 X-Sequence-Number: 65259 =?windows-1250?Q?Miroslav_=8Aulc?= writes: > seriously, I am far below this level of knowledge. But I can contribute > a test that (maybe) can help. I have rewritten the query so it JOINs the > varchar() fields (in fact all fields except the IDPK) at the last INNER > JOIN. Though there is one more JOIN, the query is more than 5 times > faster (1975.312 ms) :-) That confirms my thought that passing the data up through multiple levels of join is what's killing us. I'll work on a solution. This will of course be even less back-patchable to 8.0.* than Ogawa's work, but hopefully it will fix the issue for 8.1. regards, tom lane