Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 851079F925E for ; Fri, 9 Nov 2007 03:52:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57978-05 for ; Fri, 9 Nov 2007 03:52:50 -0400 (AST) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by postgresql.org (Postfix) with ESMTP id 6D8719F924B for ; Fri, 9 Nov 2007 03:52:52 -0400 (AST) Received: by fk-out-0910.google.com with SMTP id b27so444729fka for ; Thu, 08 Nov 2007 23:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=A8t3K/Q+XSjSgAnne1BYPOfDSGk3aBnlx8FD7leruHk=; b=giG8ZGVtit8aARqFWTtQESLAZ5HxanlQ/tLKzLb2n0Cjtm+D4F7T598wZ5GQFrWbC6GHlAoQv6XG8KOg/ZC0F9eWQdT3iz0HnTbTIUyZnyr5I+6ojMS8xiTja0skyf9kR71MaFNjbITlzdNaG9PE+JYVnogWgb80G97yExiBo9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EiUxyjwPhbcRoFPtF+mkaZhWcgmiZ4zpdcsJy5VLleGSjsgigWrzigYSqhCv7nwPYotMld0gNCO+cG7YqAY631poHydM42UbbULL5NSM6j0Uv9gMCZOp0kaBVlgYD/aRNHcUKqpxxGM1w0fGckWJM4BknMElFYFosa1d6MyImaw= Received: by 10.82.181.10 with SMTP id d10mr2411293buf.1194594769658; Thu, 08 Nov 2007 23:52:49 -0800 (PST) Received: by 10.82.118.6 with HTTP; Thu, 8 Nov 2007 23:52:49 -0800 (PST) Message-ID: <1d4e0c10711082352h4bd08276j6c1156d77577ba48@mail.gmail.com> Date: Fri, 9 Nov 2007 08:52:49 +0100 From: "Guillaume Smet" To: "Tom Lane" Subject: Re: [HACKERS] Estimation problem with a LIKE clause containing a / Cc: "Gregory Stark" , pgsql-performance , pgsql-hackers@postgresql.org In-Reply-To: <28300.1194574114@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/130 X-Sequence-Number: 27545 On Nov 9, 2007 3:08 AM, Tom Lane wrote: > This rule works for all the locales I have installed ... but I don't > have any Far Eastern locales installed. Also, my test cases are only > covering ASCII characters, and I believe many locales have some non-ASCII > letters that sort after 'Z'. I'm not sure how hard we need to try to > cover those corner cases, though. It is ultimately only an estimate... My opinion is that it's acceptable to fix the problem for most cases in most locales because, as you said, it's only an estimate. We didn't have any report of this problem for years so it seems that it's not a common case or at least it's not common that the bad estimate leads to noticeably bad plans. As far as I understand what you plan to do, it doesn't seem to be something that prevents us to fix the problem afterwards if someone comes with an example which doesn't fit in the schema you're proposing and has a real performance problem with it. -- Guillaume