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.