Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 595B7B5DC24 for ; Wed, 21 Sep 2011 21:37:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32765-03 for ; Thu, 22 Sep 2011 00:37:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from smtp-out-2.01.com (smtp.01.com [216.115.88.169]) by mail.postgresql.org (Postfix) with ESMTP id E29ADB5DC01 for ; Wed, 21 Sep 2011 21:37:16 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 8EE96414273 for ; Wed, 21 Sep 2011 19:37:16 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp-out-2.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ztXLh5TsTTj5 for ; Wed, 21 Sep 2011 19:37:16 -0500 (CDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 694FB41479F for ; Wed, 21 Sep 2011 19:37:16 -0500 (CDT) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 3BDFC414273; Wed, 21 Sep 2011 19:37:16 -0500 (CDT) Message-ID: <4E7A833B.1010609@agliodbs.com> Date: Wed, 21 Sep 2011 17:37:15 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: Broken selectivity with special inet operators References: <4E7A4923.1020900@agliodbs.com> <29153.1316638577@sss.pgh.pa.us> <4E7A547C.40700@agliodbs.com> <629.1316642270@sss.pgh.pa.us> In-Reply-To: <629.1316642270@sss.pgh.pa.us> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/149 X-Sequence-Number: 31166 > If you mean the indexscan optimization, we do know how to estimate the > cost of the indexscans, because that depends mostly on the behavior of > the added < or > condition(s). This does not imply knowing how to > estimate the behavior of >>= itself. If we can estimate the cost of the indexscan, why can't we estimate the rowcount? Sorry if I'm being dense here, but I really don't understand how the special operator code works at all. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com