Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2ADFF634074 for ; Thu, 26 Feb 2009 09:06:21 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 32544-04 for ; Thu, 26 Feb 2009 09:06:14 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f173.google.com (mail-ew0-f173.google.com [209.85.219.173]) by mail.postgresql.org (Postfix) with ESMTP id AC38D632CFC for ; Thu, 26 Feb 2009 09:06:14 -0400 (AST) Received: by ewy21 with SMTP id 21so651240ewy.19 for ; Thu, 26 Feb 2009 05:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=oyX5seONHijUulwoMg31sw7qkR4iSQfIdcQVKzzveAY=; b=g0dNBFCi0NvR7D+/jTtZlr5JDR8hx4guKLgDXiL0zW8rzv9HX6pLuLuklfvwrD21dG CkKOyy8Tbq9HNt62usxUbqIP+t/UdPrd4UP0w3qPcGDZlsb+CdI/NOknBxdR66YzYatW YP8nLFkNgxsn+JIW1xjaNC3I0pf9gAmBouJWg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=EuO+TLnGhuP7ySaMYTvrOrOF8K3qtnZUJJCKkZVrpLi9Jn1YfJ2uZE8KFauxeMQyJ4 RD+LtDpIuCwyD9iK/JZnt3H2GnxXc9Q05rsKc7QVOuXB8eE266rdWBzEKUa1WBMa603R C2eNkjFizj/smlY80XyZsxROpXKKibeSpG21s= Received: by 10.210.44.12 with SMTP id r12mr899258ebr.98.1235653572275; Thu, 26 Feb 2009 05:06:12 -0800 (PST) Received: from ?192.168.2.69? (bramka-zew.dfqs.pl [194.126.222.22]) by mx.google.com with ESMTPS id 23sm6528934eya.26.2009.02.26.05.06.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Feb 2009 05:06:11 -0800 (PST) Message-ID: <49A693C1.9060201@gmail.com> Date: Thu, 26 Feb 2009 14:06:09 +0100 From: Andrzej Zawadzki User-Agent: Icedove 2.0.0.19 (X11/20090101) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: "like" and index References: <8f750b7c0902250259w6065515as350aca3b5d7d8173@mail.gmail.com> <49A553B8.2040009@djs-consulting.com> <49A5B703.7080700@gmail.com> <49A5DC53.7030107@djs-consulting.com> In-Reply-To: <49A5DC53.7030107@djs-consulting.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/235 X-Sequence-Number: 31456 Daniel J. Summers wrote: > Andrzej Zawadzki wrote: >> Daniel J. Summers wrote: >> >>> Tony Liao wrote: >>> >>>> I try to explain analyze,but it doesn't work ,it use seq scan. >>>> >>> Generally speaking, LIKE doesn't use indexes. >>> >> ?! That's not true at all!! >> [...] > PostgreSQL (the great subject of this mailing list) doesn't do it with > a standard index (5) - you've got to use a special operator class. Please try... with "C" locales. Works out of the box. -- Andrzej Zawadzki