Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 66D659F95B0; Fri, 9 Nov 2007 12:34:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 12970-07; Fri, 9 Nov 2007 12:33:52 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 854069F959D; Fri, 9 Nov 2007 12:33:53 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA9GXjAo011343; Fri, 9 Nov 2007 11:33:45 -0500 (EST) To: Gregory Stark cc: "Guillaume Smet" , "pgsql-performance" , pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Estimation problem with a LIKE clause containing a / In-reply-to: <87hcjvpydn.fsf@oxford.xeocode.com> References: <1d4e0c10711070453q214f089cpd144cbb5193d3c4f@mail.gmail.com> <17767.1194453292@sss.pgh.pa.us> <11467.1194477248@sss.pgh.pa.us> <1d4e0c10711080208n6c9875b4tf5882da3ced18532@mail.gmail.com> <27405.1194542548@sss.pgh.pa.us> <87prykpc3q.fsf@oxford.xeocode.com> <25287.1194568820@sss.pgh.pa.us> <28300.1194574114@sss.pgh.pa.us> <87hcjvpydn.fsf@oxford.xeocode.com> Comments: In-reply-to Gregory Stark message dated "Fri, 09 Nov 2007 09:21:56 +0000" Date: Fri, 09 Nov 2007 11:33:45 -0500 Message-ID: <11342.1194626025@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/140 X-Sequence-Number: 27555 Gregory Stark writes: > Could we not use the bogus range to calculate the histogram estimate > but apply the LIKE pattern directly to the most-frequent-values > instead of applying the bogus range? Or would that be too much code > re-organization for now? We have already done that for quite some time. It won't help Guillaume's case anyhow: he's got no MCVs, presumably because the field is unique. regards, tom lane