Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hM3U2-0007ku-Vs for pgsql-general@arkaria.postgresql.org; Thu, 02 May 2019 04:38:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hM3T2-0005HG-0h for pgsql-general@arkaria.postgresql.org; Thu, 02 May 2019 04:37:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hM3T1-0005DN-FC for pgsql-general@lists.postgresql.org; Thu, 02 May 2019 04:37:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hM3Sx-00016c-NS for pgsql-general@lists.postgresql.org; Thu, 02 May 2019 04:37:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x424axdb001475; Thu, 2 May 2019 00:36:59 -0400 From: Tom Lane To: Sergey Koposov cc: "pgsql-general@lists.postgresql.org" Subject: Re: strange nested loop row count estimates In-reply-to: References: Comments: In-reply-to Sergey Koposov message dated "Thu, 02 May 2019 00:59:52 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1473.1556771819.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 02 May 2019 00:36:59 -0400 Message-ID: <1474.1556771819@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Sergey Koposov writes: > I'm currently trying to understand the expected row counts for a query i= nvolving a nested loop join and bitmap index scan = > on the functional index and a custom operator. And the numbers that I se= e don't make sense to me currently. What sort of selectivity estimator have you got attached to that custom operator? regards, tom lane