Re: how to speed ilike - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: how to speed ilike
Date
Msg-id 4B5D45D3020000250002EB4A@gw.wicourts.gov
Whole thread Raw
In response to how to speed ilike  (Julius Tuskenis <julius@nsoft.lt>)
Responses Re: how to speed ilike  (Julius Tuskenis <julius@nsoft.lt>)
List pgsql-admin
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(username)));

You might want to have that function force all letters to lowercase.
It might also help to specify varchar_pattern_ops.

-Kevin

pgsql-admin by date:

Previous
From: Julius Tuskenis
Date:
Subject: how to speed ilike
Next
From: "Kevin Grittner"
Date:
Subject: Re: max_fsm_pages question