indexing and LIKE - Mailing list pgsql-sql

From Patrik Kudo
Subject indexing and LIKE
Date
Msg-id 20011011141651.B50778-100000@tb303.partitur.se
Whole thread Raw
Responses Re: indexing and LIKE  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: indexing and LIKE  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
Hi!

If I want to be able to search for stringmatches using LIKE, doing
something like the following:

select id, name from table1 where lower(name) like 'somestring%';

Actually I will be joining with some other table on id too, but the join
will produce a substancial amount of data to be filtered with the LIKE
clause so I figure if it'd be possible to index on lower(name) somehow,
it would result in an appreciated speed gain.

Is it at all possible to create an index on lower(name), and in that case,
what type of index and using what syntax? Is it possible to create a
multicolumn index on both id and name? Both id and name are of type
"text".

TIA,
Patrik Kudo



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [NOVICE] Loading current_user and current_timestamp using COPY
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: indexing and LIKE