Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1qaw-0002Bn-Fw for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2013 04:22:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1qav-0001na-R3 for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2013 04:22:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1qau-0001nT-U4 for pgsql-bugs@postgresql.org; Wed, 24 Jul 2013 04:22:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1qar-0001YV-Ch for pgsql-bugs@postgresql.org; Wed, 24 Jul 2013 04:22:32 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r6O4MSCg004166; Wed, 24 Jul 2013 00:22:28 -0400 (EDT) From: Tom Lane To: andrew@tao11.riddles.org.uk cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8274: Wildly insane boolean selectivity estimates In-reply-to: References: Comments: In-reply-to andrew@tao11.riddles.org.uk message dated "Mon, 01 Jul 2013 15:00:43 -0000" Date: Wed, 24 Jul 2013 00:22:28 -0400 Message-ID: <4165.1374639748@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org andrew@tao11.riddles.org.uk writes: > The handling of freq_null for estimating IS NOT TRUE/FALSE for boolean > columns which are all null or almost all null (enough that analyze doesn't > find any non-null values to put in MCV) is completely off in the weeds. Doh, definitely a bit of brain fade there :-( > Suggested fix at: > https://gist.github.com/RhodiumToad/5901567 Seems reasonable, will fix. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs