X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D25919FA4A0 for ; Mon, 1 May 2006 08:35:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33774-09 for ; Mon, 1 May 2006 08:35:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id A0A629FA3A6 for ; Mon, 1 May 2006 08:35:28 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id DB66430F1C; Mon, 1 May 2006 13:35:26 +0200 (MET DST) From: "mlartz@gmail.com" X-Newsgroups: pgsql.performance Subject: Re: Easy question Date: 1 May 2006 04:35:20 -0700 Organization: http://groups.google.com Lines: 9 Message-ID: <1146483320.091670.38040@u72g2000cwu.googlegroups.com> References: <1145741653.759727.38970@e56g2000cwe.googlegroups.com> <1146101167.724196.253740@v46g2000cwv.googlegroups.com> <1146355679.311472.57800@u72g2000cwu.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com In-Reply-To: <1146355679.311472.57800@u72g2000cwu.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: u72g2000cwu.googlegroups.com; posting-host=151.196.11.66; posting-account=hpADjAwAAABN5Lkl4wJ_Us9DXosY2bot To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/2 X-Sequence-Number: 18789 I can't speak to "the access mode of the SQL statement" but it looks like the index that you are looking for is an index on an expression, as shown in: http://www.postgresql.org/docs/8.0/static/indexes-expressional.html You probably want a btree on UPPER(municipo), if that is the primary query method for the column.