Re: [ADMIN] how to speed ilike

2010-01-26 Thread Dimitri Fontaine
Julius Tuskenis writes: > Tried that too, but seem to me that ILIKE doesn't use the index. I'm using > username ilike '%blablabla%' , so maybe theres no way for ilike to benefit > from an index. See pg_trgm and Full Text Search. http://www.postgresql.org/docs/8.4/interactive/pgtrgm.html http

Re: [ADMIN] how to speed ilike

2010-01-25 Thread Kenneth Marshall
On Mon, Jan 25, 2010 at 05:33:10PM +0200, Julius Tuskenis wrote: > Thank you for your answer Kevin. >> create index tblname_username_latin on tblname >> ((fnk_latin(username))); >> > Tried this, but with no changes >> You might want to have that function force all letters to lowercase. >> >

Re: [ADMIN] how to speed ilike

2010-01-25 Thread Julius Tuskenis
Thank you for your answer Kevin. create index tblname_username_latin on tblname ((fnk_latin(username))); Tried this, but with no changes You might want to have that function force all letters to lowercase. Tried that too, but seem to me that ILIKE doesn't use the index. I'm using usern

Re: [ADMIN] how to speed ilike

2010-01-25 Thread Kevin Grittner
Julius Tuskenis wrote: > I've made a function that converts lithuanian letters to latin and > use it like fnk_latin(username) ILIKE fnk_latin('kestas'). > Now the problem is performance. > Maybe some special index would help? create index tblname_username_latin on tblname ((fnk_latin(usern

[ADMIN] how to speed ilike

2010-01-25 Thread Julius Tuskenis
Hello I have a task to make postgres find user records no matter if they are spelled correctly. In particular I have to find names with Lithuanian letters even if the user searches using latin letters. For example search criteria 'kestas' should find 'Kęstas'. I've made a function that conver