X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BB399D1B519 for ; Wed, 28 Apr 2004 09:52:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39914-05 for ; Wed, 28 Apr 2004 09:52:23 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8D9D5D1B503 for ; Wed, 28 Apr 2004 09:52:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3SCqLDj027628; Wed, 28 Apr 2004 08:52:21 -0400 (EDT) To: Silke Trissl Cc: pgsql-performance@postgresql.org Subject: Re: Join problem In-reply-to: <408E9934.8060509@informatik.hu-berlin.de> References: <408E9934.8060509@informatik.hu-berlin.de> Comments: In-reply-to Silke Trissl message dated "Tue, 27 Apr 2004 19:32:36 +0200" Date: Wed, 28 Apr 2004 08:52:20 -0400 Message-ID: <27627.1083156740@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/484 X-Sequence-Number: 6784 Silke Trissl writes: > I found out, that the change of the operator from '~*' to '=' for the > item.description brought a great boost in performance (425 secs to 1 > sec!), but not in cost (Query plans at the end). The main problem seems to be bad estimation of the number of rows extracted from the item table. Have you ANALYZEd that table lately? regards, tom lane