X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 871033A3E91 for ; Wed, 24 Nov 2004 22:51:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13370-02 for ; Wed, 24 Nov 2004 22:51:18 +0000 (GMT) Received: from ms-smtp-01-eri0.ohiordc.rr.com (ms-smtp-01-smtplb.ohiordc.rr.com [65.24.5.135]) by svr1.postgresql.org (Postfix) with ESMTP id 958243A43D4 for ; Wed, 24 Nov 2004 22:51:19 +0000 (GMT) Received: from enzo.mascari.com (dhcp065-024-156-214.columbus.rr.com [65.24.156.214]) by ms-smtp-01-eri0.ohiordc.rr.com (8.12.10/8.12.7) with ESMTP id iAOMpFlv025355; Wed, 24 Nov 2004 17:51:16 -0500 (EST) Received: from [192.168.2.1] (ferrari.mascari.com [192.168.2.1]) by enzo.mascari.com (8.12.8/8.12.8) with ESMTP id iAOMpE97007747; Wed, 24 Nov 2004 17:51:14 -0500 Message-ID: <41A51061.30805@mascari.com> Date: Wed, 24 Nov 2004 17:51:13 -0500 From: Mike Mascari User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-performance@postgresql.org Subject: Re: Slow execution time when querying view with WHERE clause References: <41A25C3B.3040608@mascari.com> <28237.1101232445@sss.pgh.pa.us> <41A42409.7080704@mascari.com> <4738.1101277883@sss.pgh.pa.us> In-Reply-To: <4738.1101277883@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mascari-MailScanner-Information: Please contact the ISP for more information X-Mascari-MailScanner: Found to be clean X-Mascari-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 6, autolearn=not spam) X-MailScanner-From: mascarm@mascari.com X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/388 X-Sequence-Number: 9342 Tom Lane wrote: > Um ... doh ... analyze.c about line 1550: > > /* We can only compute valid stats if we found some non-null values. */ > if (nonnull_cnt > 0) > ... > > There's a bit of an epistemological issue here: if we didn't actually > find any nonnull values in our sample, is it legitimate to assume that > the column is entirely null? On the other hand, if we find only "3" in > our sample we will happily assume the column contains only "3", so I > dunno why we are discriminating against null. This seems like a case > that just hasn't come up before. Will this discriminatory policy toward null end for 8.0? Mike Mascari