Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 865549F9244 for ; Thu, 8 Nov 2007 06:08:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 28731-08 for ; Thu, 8 Nov 2007 06:08:21 -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 65C899F9242 for ; Thu, 8 Nov 2007 06:08:35 -0400 (AST) Received: by fk-out-0910.google.com with SMTP id b27so109089fka for ; Thu, 08 Nov 2007 02:08:33 -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=aNngIHztg7+pSx43qLmn7WHoeDIStDDDNPKVnKgESbk=; b=tqDUv5rMPOMuNMbU1tIDRWkdIALlawbTrAJEuHR5szO2k/XDYauTTALlfNSf3OTV+aFbN0UuByNxmCXMa8pvVSC8LFfV7chDg5u8XE60JqhA3co8+lDSmE4/T9qNT+WUAw3U0BfD5LdChvO4fJi/BMOv5wpwPxrPXzXZMmKHFbE= 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=RlII+unX9M2l0Njd0YRShlG10UbXdpcKhIG3a3fElKnFBfVAVQoDe6lHZNoBJpOvaxuu7/Cdu+RXt/flqWHMMval9ZDHSCrKdEnkZTTTmWWJjtFsGI7SCzbsadlHeiR7Q/fwUtZhRTJB/1V9n5rQFWEmb6CS4ulB0fwpKRtYFDY= Received: by 10.82.111.8 with SMTP id j8mr927301buc.1194516513409; Thu, 08 Nov 2007 02:08:33 -0800 (PST) Received: by 10.82.118.6 with HTTP; Thu, 8 Nov 2007 02:08:33 -0800 (PST) Message-ID: <1d4e0c10711080208n6c9875b4tf5882da3ced18532@mail.gmail.com> Date: Thu, 8 Nov 2007 11:08:33 +0100 From: "Guillaume Smet" To: "Tom Lane" Subject: Re: Estimation problem with a LIKE clause containing a / Cc: pgsql-performance In-Reply-To: <11467.1194477248@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> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/92 X-Sequence-Number: 27507 Tom, On Nov 8, 2007 12:14 AM, Tom Lane wrote: > I've applied a patch that might help you: > http://archives.postgresql.org/pgsql-committers/2007-11/msg00104.php AFAICS, it doesn't seem to fix the problem. I just compiled REL8_1_STABLE branch and I still has the following behaviour: lbo=# ANALYZE cms_items; ANALYZE lbo=# explain analyze select * from cms_items where ancestors LIKE '1062/%'; QUERY PLAN ------------------------------------------------------------------------------------------------------------ Seq Scan on cms_items (cost=0.00..688.26 rows=1 width=103) (actual time=0.009..22.258 rows=11326 loops=1) Filter: ((ancestors)::text ~~ '1062/%'::text) Total runtime: 29.835 ms (3 rows) lbo=# show lc_collate; lc_collate ------------- fr_FR.UTF-8 (1 row) Do you see any reason why your patch doesn't change anything in this case? Thanks. -- Guillaume