X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 104CA53415 for ; Thu, 24 Mar 2005 05:59:41 +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 78582-04 for ; Thu, 24 Mar 2005 05:59:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 142F753407 for ; Thu, 24 Mar 2005 05:59:30 +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 j2O5xTQ5023425; Thu, 24 Mar 2005 00:59:30 -0500 (EST) To: tgunasekara@openworld.org Cc: "PGSQL Admin" Subject: Re: Why this Query Plan is different In-reply-to: <20050324040117.87BC753582@svr1.postgresql.org> References: <20050324040117.87BC753582@svr1.postgresql.org> Comments: In-reply-to "Thilina Gunasekara" message dated "Thu, 24 Mar 2005 10:00:48 +0600" Date: Thu, 24 Mar 2005 00:59:29 -0500 Message-ID: <23424.1111643969@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/383 X-Sequence-Number: 16881 "Thilina Gunasekara" writes: > I have two PostgreSQL Database Servers running on Gentoo which versions are > PostgreSQL 7.4.5 (Box A) and PostgreSQL 7.3.9 (Box B) > Due to a recent query posted by a developer I was interested to know which > factors are affecting these two servers to behave in a different manner to > the same query. Please shed light on this. 7.4 knows a great deal more about optimizing IN queries than 7.3 does. I think you have misidentified the two query plans, because "Hash IN Join" is not a plan type that 7.3 has at all. What is not clear to me is which version is really slower. Could we see EXPLAIN ANALYZE output (correctly labeled ;-)) not just EXPLAIN? regards, tom lane