Re: [SQL] indexing and LIKE

2001-10-12 Thread Stephan Szabo
On Fri, 12 Oct 2001, Patrik Kudo wrote: > kudo=# select version(); >version > -- > PostgreSQL 7.1.3 on i386--freebsd4.3, compiled by GCC 2.95.3 > (1 row) > > kudo=# create index person_lower_lname_idx on per

Re: [SQL] indexing and LIKE

2001-10-12 Thread Tom Lane
Patrik Kudo <[EMAIL PROTECTED]> writes: > Thanks for your respons, but I'm afraid it didn't help. I've succeeded > with indexing my table using functional indices, but the problem is that > the index I create won't work with my query. Works for me: test71=# create table person (last_name text);

Re: [SQL] indexing and LIKE

2001-10-11 Thread Allan Engelhardt
Patrik Kudo wrote: > [...] > > Is it at all possible to create an index on lower(name), and in that case, > what type of index and using what syntax? You'll want to look at section 7.5 "Functional Indices" in the 7.1.3 'User's Guide'. Allan. ---(end of broadcast)---

Re: [SQL] indexing and LIKE

2001-10-11 Thread Stephan Szabo
On Thu, 11 Oct 2001, Patrik Kudo wrote: > 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 joi

Re: [SQL] indexing and LIKE

2001-10-11 Thread Ross J. Reedstrom
On Thu, Oct 11, 2001 at 02:28:34PM +0200, Patrik Kudo wrote: > 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

[SQL] indexing and LIKE

2001-10-11 Thread Patrik Kudo
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 filtere