Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D96DF2E0125 for ; Tue, 26 Feb 2008 14:01:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 54557-02-5 for ; Tue, 26 Feb 2008 14:01:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B29572E0150 for ; Tue, 26 Feb 2008 13:59:46 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1QHxdcT005297; Tue, 26 Feb 2008 12:59:39 -0500 (EST) To: "Laurent Raufaste" cc: pgsql-performance@postgresql.org Subject: Re: PG planning randomly ? In-reply-to: <669dc9710802260912y7fe58f9epe42fe7eb360119d8@mail.gmail.com> References: <669dc9710802260719h61d846b3hd50b7f547bcb82c3@mail.gmail.com> <3637.1204043502@sss.pgh.pa.us> <669dc9710802260912y7fe58f9epe42fe7eb360119d8@mail.gmail.com> Comments: In-reply-to "Laurent Raufaste" message dated "Tue, 26 Feb 2008 18:12:07 +0100" Date: Tue, 26 Feb 2008 12:59:39 -0500 Message-ID: <5296.1204048779@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/347 X-Sequence-Number: 28889 "Laurent Raufaste" writes: > 2008/2/26, Tom Lane : >> If it's 8.2 or later then increasing the stats target for _comment.path >> to 100 or more would likely help. > I'm using PG 8.2.4. > We are using 100 as default_statistics_target by default and all our > column are using this value: Hmm, that ought to be enough to activate the better selectivity estimator. Unless ... did you update this database from a pre-8.2 DB that already had contrib/ltree in it? If so, did you just load the existing old definition of ltree as part of your dump, or did you install 8.2's version fresh? I'm wondering if you have a definition of operator <@ that doesn't specify the new selectivity estimator. Please try a pg_dump -s and see what it shows as the definition of <@. regards, tom lane